【问题标题】:qt creator needs a compiler set up to build. configure a compiler in the kit options, after adding compiler, cannot produce code for the qt versionqt creator 需要一个编译器来构建。在kit options中配置一个编译器,添加编译器后,无法生成qt版本的代码
【发布时间】:2023-03-06 06:23:02
【问题描述】:

好吧..我在我的 Windows 7 上下载并安装了 qt 5.1.1(msvc2012,64 位)。我尝试运行一个简单的 qt gui 应用程序......这就是发生的事情:

当我按下“运行”时……出现错误……它说:

"qt creator 需要设置编译器来构建。在套件选项中配置编译器"

然后我发现我有一个要添加的 4 个编译器的列表……当我添加 mingw 时……它说:

“编译器mingw无法为qt版本'qt 5.1.1 MSVC2012 64 bit'生成代码”

它对我从 4 个列表中选择的所有其他编译器执行相同的操作……但是,我再次按下“运行”……正如预期的那样,它没有工作……这是编译输出:

19:16:31: Running steps for project code...
19:16:31: Starting: "C:\Qt\Qt5.1.1\5.1.1\msvc2012_64\bin\qmake.exe"              C:\Users\shades\code\code.pro -r -spec win32-g++
19:16:31: The process "C:\Qt\Qt5.1.1\5.1.1\msvc2012_64\bin\qmake.exe" exited normally.
19:16:31: Starting: "mingw32-make.exe" -r -w 
qtcreator_ctrlc_stub: Command line failed: mingw32-make.exe -r -w 
19:16:32: The process "mingw32-make.exe" exited with code -1.
Error while building/deploying project code (kit: Desktop Qt 5.1.1 MSVC2012 64bit)
When executing step 'Make'
19:16:32: Elapsed time: 00:01.

我该怎么办??请帮忙....

【问题讨论】:

  • 编译器需要配置MSVC 2012 64bit,需要安装Visual Studio 2012,或者安装Qt for mingw。
  • 感谢您的回复...我如何将 MSVC 2012 64 位配置为编译器???...(请您一步一步解释,我真的不太了解)...或我从哪里下载 qt for mingw??...这是否意味着我必须下载另一个巨大的 qt 文件??...那会是什么样的... 500 mb 或其他什么?!!.. 但你能给无论如何,我的链接(为mingw下载qt)......
  • 您在之前选择 mingw 的位置配置编译器。当然,它需要安装 Visual Studio 2012 64 才能在此处选择编译器。你有安装和工作吗? Qt for mingw 安装程序在qt-project.org/downloads 上标记为“Qt 5.1.1 for Windows 32-bit (MinGW 4.8, OpenGL, 666 MB)”
  • 不,我没有……我有 Visual Studio 2010……不是 2012……那我现在该怎么办……??下载 vs 2012 或 qt for mingw??.. 什么更容易??

标签: qt


【解决方案1】:

您拥有的 Qt 版本用于编译器 MSVC2012 64 位。该编译器适用于 Microsoft Visual C 2012 64 位。

如果你想使用那个编译器,你应该下载 MinGW 版本。 mingw 版 Qt 的安装程序附带了 MinGW 的编译器。

【讨论】:

  • 重新下载??!... 500 mb 什么的??...无论如何...你能给我一个链接...谢谢您的帮助..
猜你喜欢
  • 2013-01-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-12-11
相关资源
最近更新 更多