How to use QTcreator with the Visual Studios november CTP compiler?

限于喜欢 提交于 2020-01-03 03:16:08

问题


I've been struggling with this for a few days now. I can't figure out how to set up QT to use the cpt compiler. I've used a program called BlueGo (https://bitbucket.org/Vertexwahn/bluego) to compile Qt with VS2012, and I can use that version with QtCreator np. I can use the nonupdated VS2012-compiler with it, but I can't set up the ctp-compiler, it just gives me an error that it's unable to use the compiler. It doesn't detect it automatically so I'll have to add it as a custom compiler. I don't understand half of those settings lol :).


回答1:


  • In C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat
    1. just after the line:
      @set PATH=%VCINSTALLDIR%BIN\x86_amd64;%PATH%
      insert:
      @if exist "%VCINSTALLDIR%..\..\Microsoft Visual C++ Compiler Nov 2012 CTP\BIN\x86_amd64" set PATH=%VCINSTALLDIR%..\..\Microsoft Visual C++ Compiler Nov 2012 CTP\BIN\x86_amd64;%PATH%
    2. just after the line:
      @set INCLUDE=%VCINSTALLDIR%INCLUDE;%INCLUDE%
      insert:
      @if exist "%VCINSTALLDIR%..\..\Microsoft Visual C++ Compiler Nov 2012 CTP\INCLUDE" set INCLUDE=%VCINSTALLDIR%..\..\Microsoft Visual C++ Compiler Nov 2012 CTP\INCLUDE;%INCLUDE%
  • In C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\vcvars32.bat
    1. just after the line:
      @if exist "%VCINSTALLDIR%BIN" set PATH=%VCINSTALLDIR%BIN;%PATH%
      insert:
      @if exist "%VCINSTALLDIR%..\..\Microsoft Visual C++ Compiler Nov 2012 CTP\BIN" set PATH=%VCINSTALLDIR%..\..\Microsoft Visual C++ Compiler Nov 2012 CTP\BIN;%PATH%
    2. just after the line:
      @if exist "%VCINSTALLDIR%INCLUDE" set INCLUDE=%VCINSTALLDIR%INCLUDE;%INCLUDE%
      insert:
      @if exist "%VCINSTALLDIR%..\..\Microsoft Visual C++ Compiler Nov 2012 CTP\INCLUDE" set INCLUDE=%VCINSTALLDIR%..\..\Microsoft Visual C++ Compiler Nov 2012 CTP\INCLUDE;%INCLUDE%

This simple solution allows Qt Creator (and other tools, that relies on vcvarsall.bat) to use VS2012 NOV CTP instead of default one. Remember: To revert back to the default compiler you should remove these inserted lines!



来源:https://stackoverflow.com/questions/17085785/how-to-use-qtcreator-with-the-visual-studios-november-ctp-compiler

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