将demo源程序复制,在qt creator运行时出现了错误。error: LNK1181: cannot open input file 'debug\main.obj'

 

error: LNK1181: cannot open input file 'debug\main.obj'在文件目录中不使用空格和复杂符号。(待定)

This is most likely caused by an error in the project settings. Source files (*.cpp) are compiled into object files (*.o) which are then all linked together. Somehow the linker is failing to find the object files compiled from your source files. I can tell it is looking into debug\, but they are being stored somewhere else. Do you have write permissions to that directory?

This problem also occurs if the path of your project (name of any folder) contains a white space.

'The error occurs because the linker in VS2005 can not find the file or the file path defined in the project properties. However, the file path or file in the properties is correct because the linker can handle space character in the file path.

To solve the issue, you just avoid to use space character in the file path or add quotation around file path in project properties.

 

程序考背后需 构建->清理项目,因为一些配置qmake等与源目录相关,直接运行的话会在原来的拷贝目录下生成debug目录和调试文件,切若原目录不存在的话也将重新创建。而不是在当前新文件夹下生成调试文件。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Qt Creator是一个跨平台的集成开发环境(IDE),用于开发基于Qt框架的应用程序。它提供了一套丰富的工具和功能,帮助开发者进行代码编辑、调试、构建和部署等任务。 关于你提到的错误信息"error while loading shared libraries: libEGL.so.1: cannot open shared object file: No such file or directory",这通常是由于缺少libEGL.so.1库文件引起的。libEGL.so.1是OpenGL ES图形库的一部分,它在运行Qt Creator时可能会被需要。 解决这个问题的方法是确保libEGL.so.1库文件存在于系统中,并且可以被正确加载。你可以尝试以下几种方法来解决这个问题: 1. 安装缺失的库文件:使用包管理器或者手动下载libEGL.so.1库文件,并将其放置在系统的库搜索路径中(如/usr/lib或/usr/local/lib)。 2. 更新系统:如果你已经安装了libEGL.so.1库文件,但仍然遇到该错误,可能是因为库文件版本不兼容。尝试更新系统和相关软件包,以确保使用的库文件版本正确匹配。 3. 检查环境变量:确保LD_LIBRARY_PATH环境变量包含了库文件所在的路径。你可以通过运行以下命令来检查和设置LD_LIBRARY_PATH变量: ``` echo $LD_LIBRARY_PATH export LD_LIBRARY_PATH=/path/to/library:$LD_LIBRARY_PATH ``` 请注意,具体的解决方法可能因操作系统和Qt Creator版本而有所不同。如果以上方法无法解决问题,建议查阅Qt Creator的官方文档或者在相关的开发者社区中寻求帮助。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值