我几天来一直在努力解决这个问题。我无法弄清楚如何设置QT来使用cpt编译器。我使用了一个名为BlueGo(https://bitbucket.org/Vertexwahn/bluego)的程序来编译Qt和VS2012,我可以将该版本与QtCreator np一起使用。我可以使用非更新的VS2012编译器,但我无法设置ctp编译器,它只是给我一个错误,它无法使用编译器。它不会自动检测它,因此我必须将其添加为自定义编译器。我不明白一半的设置大声笑:)。
答案 0 :(得分:1)
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat
@set PATH=%VCINSTALLDIR%BIN\x86_amd64;%PATH%
@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%
@set INCLUDE=%VCINSTALLDIR%INCLUDE;%INCLUDE%
@if exist "%VCINSTALLDIR%..\..\Microsoft Visual C++ Compiler Nov 2012 CTP\INCLUDE" set INCLUDE=%VCINSTALLDIR%..\..\Microsoft Visual C++ Compiler Nov 2012 CTP\INCLUDE;%INCLUDE%
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\vcvars32.bat
@if exist "%VCINSTALLDIR%BIN" set PATH=%VCINSTALLDIR%BIN;%PATH%
@if exist "%VCINSTALLDIR%..\..\Microsoft Visual C++ Compiler Nov 2012 CTP\BIN" set PATH=%VCINSTALLDIR%..\..\Microsoft Visual C++ Compiler Nov 2012 CTP\BIN;%PATH%
@if exist "%VCINSTALLDIR%INCLUDE" set INCLUDE=%VCINSTALLDIR%INCLUDE;%INCLUDE%
@if exist "%VCINSTALLDIR%..\..\Microsoft Visual C++ Compiler Nov 2012 CTP\INCLUDE" set INCLUDE=%VCINSTALLDIR%..\..\Microsoft Visual C++ Compiler Nov 2012 CTP\INCLUDE;%INCLUDE%
这个简单的解决方案允许Qt Creator(以及依赖vcvarsall.bat
的其他工具)使用VS2012 NOV CTP而不是默认值。请记住:要恢复到默认编译器,您应该删除这些插入的行!