C++ Qt 框架:qmake 退出,错误代码 2,找不到 project.pro 文件,但它在那里 [英] C++ Qt framework: qmake exits with error code 2, can not find project.pro file, yet it's there

查看:59
本文介绍了C++ Qt 框架:qmake 退出,错误代码 2,找不到 project.pro 文件,但它在那里的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所说,我在使用 Qt Creator 时遇到了问题.我开始使用它并创建了一个包含一些代码的 main() ,当我想编译它以查看它在屏幕上的显示方式时,我无法这样做,我看到以下错误:<块引用>

找不到文件:/Users/Eugene/Documents/Qt/Test/test.pro.进程/Users/Eugene/QtSDK/Desktop/Qt/473/gcc/bin/qmake"以error cade 2. 项目Test(build:Desktop)编译时出错在步骤 'qmake'

但是当我进入文件夹时,我可以在那里看到 test.pro 文件,所以我不明白 Qt 为什么不开心.

有人遇到过类似的问题吗?到目前为止我找不到任何类似的问题.预先感谢您的帮助,问候

解决方案

您确定您的项目路径中没有空格或其他奇怪"字符吗?如果是这样,Qt 就不高兴了.

您也可以尝试删除*.pro.user文件,然后重新编译.如果不幸它们都不起作用,您可以尝试在命令行上编译您的项目.

cd 到您项目的根目录和:

  1. qmake -project
  2. mingw32-make

如果仍然无法编译您的项目,您应该检查您的 Qt 安装.

As the title says, I am having an issue with Qt Creator. I started to play with it and created a main() with a some code in it and when I wanted to compile it to see how it would appear on the screen, I am unable to do so, I see the following error:

Cannot find file: /Users/Eugene/Documents/Qt/Test/test.pro. Le processus "/Users/Eugene/QtSDK/Desktop/Qt/473/gcc/bin/qmake" terminated with error cade 2. Error during the compilation of the project Test (build : Desktop) during the step 'qmake'

Yet when I go to the folder, I can see the test.pro file there, so I don't see why Qt is unhappy.

Did anybody have had a similar problem? I couldn't find any similar question so far. Thanks in advance for you help, Regards

解决方案

Are you sure that you don't have space or other 'weird' characters in your project's path? If so, Qt is unhappy.

You may also try to delete the *.pro.user file and try to compile again. If unfortunately neither of them work, you can try to compile your project on the command line.

cd to the root directory of your project and:

  1. qmake -project
  2. mingw32-make

If this still can't get your project compiled, you should check your Qt installation.

这篇关于C++ Qt 框架:qmake 退出,错误代码 2,找不到 project.pro 文件,但它在那里的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆