using Qt 5.0 with Qt Creator and vs2010 compiler

大城市里の小女人 提交于 2019-12-12 01:44:49

问题


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).

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

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.


回答1:


Seems like you didn't install MSVC yet. Get it from Microsoft website.

Than download sources from Nokia. Unpack them to a new folder e.g C:\QtSources and compile them with MSVC. This instructions are working just fine.

Finally add them to Qt Creator in

Tools -> Options -> Building -> Qt Versions 

by poiting to your new qmake executable in

C:\QtSources\bin\qmake.exe

Hope Qt 5 will work with free Express Edition of MSVC.




回答2:


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:

  • 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.

The debugger is something like C:\Program Files\Windows Kits\8.0\Debuggers\x86\cdb.exe.

Good luck!



来源:https://stackoverflow.com/questions/14589232/using-qt-5-0-with-qt-creator-and-vs2010-compiler

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!