简体   繁体   English

使用Qt Creator运行错误

[英]Run Error With Qt Creator

I just downloaded and installed Qt Creator. 我刚下载并安装了Qt Creator。 I have not messed with the PATH or any other settings. 我没有搞乱PATH或任何其他设置。 But when I try to run a Qt GUI Application project, it gives the following error: 但是当我尝试运行Qt GUI Application项目时,它会出现以下错误:

cc1plus.exe:-1: error: error: unrecognized command line option "-fno-keep-inline-dllexport"

The output says: 输出说:

Error while building/deploying project ProjectFirst (kit: Desktop Qt 5.0.1 MinGW 32bit) When executing step 'Make' 构建/部署项目ProjectFirst时出错(工具包:Desktop Qt 5.0.1 MinGW 32bit)执行步骤'Make'时

I don't understand why this is happening. 我不明白为什么会这样。 I looked it up online a lot before asking, but couldn't find anything. 在询问之前,我在网上查了很多,但找不到任何东西。

I've just found the problem on my friend's computer the same as yours. 我刚刚在朋友的电脑上发现问题和你的一样。

Type g++ --version to see what g++ is taking by default from your path. 键入g ++ --version以查看默认情况下g ++从您的路径中获取的内容。 If it is 4.4.* (<= 4.7.2) then found that old g++ and remove it to the trash. 如果它是4.4。*(<= 4.7.2),那么找到旧的g ++并将其删除到垃圾箱。 Usually it goes with Perl package, needed by Qt configure. 通常它与Qt configure所需的Perl包一起使用。

Then return to Console and try g++ --version again if it not 4.7.2 then lookfor old g++ again and remove it. 然后返回到控制台并再次尝试g ++ --version,如果它不是4.7.2则再次查找旧的g ++并将其删除。

If it is written g++ : command not found or something like that - change your PATH variable. 如果写入g ++:命令未找到或类似的东西 - 更改您的PATH变量。 Don't forget to reboot your computer after changing it. 更改后不要忘记重新启动计算机。

When you got g++ --version with 4.7.2, look forward to having success. 当你使用4.7.2获得g ++ --version时,期待获得成功。

尝试使用nmake,而不是mingw32-make

The problem is that you are using the wrong mingw32 installation (an older version). 问题是您使用的是错误的mingw32安装(旧版本)。

In order to solve this, check that the Kit you use has detected the correct Mingw version (this should be 4.7, which is located inside the qt installation tools directory). 为了解决这个问题,请检查您使用的套件是否检测到正确的Mingw版本(这应该是4.7,它位于qt安装工具目录中)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM