将 Qt 5.0 与 Qt Creator 和 vs2010 编译器一起使用 [英] using Qt 5.0 with Qt Creator and vs2010 compiler

查看:81
本文介绍了将 Qt 5.0 与 Qt Creator 和 vs2010 编译器一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近决定从 Qt 4.X 升级到 5,虽然现在它只支持 vs2010.每当我启动 Qt Creator 时,我都会发现没有任何编译器(并且设置中没有选项可以设置).

I recently decided to upgrade from Qt 4.X to 5, though now it has only vs2010 supported. Whenever I start Qt Creator I get that there isn't any compiler (and there are no options in the settings to set one).

问题:如何下载vs2010编译器?我必须下载 vs2010 本身吗?我也会得到一个调试器吗?

Question: How do I download the vs2010 compiler? Do I have to download vs2010 itself? Will I get a debugger as well?

我已经尝试过这个建议,但是 Qt 没有选择编译器:使用 Visual Studio 作为 QT Creator 的编译器

I have tried this suggestion, but Qt didn't pick up the compiler: Using Visual Studio as a Compiler for QT Creator

抱歉,如果之前有人问过这个问题,但我一直无法找到解释我应该做什么的来源.

Sorry if this question have been asked before, but I have been unable to find a source that explains what I should do.

推荐答案

您不需要重新编译 Qt,因为 SDK 版本是使用 msvc2010 32 位构建的.要进行调试,您可能需要下载 Windows SDK 8.Qt Creator 可能会自动检测您的编译器和调试器,但如果没有,请按以下步骤操作:

You shouldn't need to re-compile Qt, as the SDK version is built with msvc2010 32-bit. For debugging, you may need to download the Windows SDK 8. Qt Creator may auto-detect your compiler and debugger, but if not, proceed as follows:

  • Options/Build & 下Run/Qt Versions,指向qmake.exe
  • Options/Build & 下Run/Kits,将Qt Version"设置为你刚创建的那个,并设置你的编译器和调试器
  • Under Options/Build & Run/Qt Versions, point to qmake.exe
  • Under Options/Build & Run/Kits, set "Qt Version" to the one you just created, and set your compiler and debugger

如果编译器在你的系统上,它应该被自动检测.

The compiler should be auto-detected if it's on your system.

调试器类似于C:\Program Files\Windows Kits\8.0\Debuggers\x86\cdb.exe.

祝你好运!

这篇关于将 Qt 5.0 与 Qt Creator 和 vs2010 编译器一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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