2013-06-13 74 views
1

我一直在为此奋斗了几天。我无法弄清楚如何设置QT来使用cpt编译器。我使用了一个名为BlueGo(https://bitbucket.org/Vertexwahn/bluego)的程序来编译Qt与VS2012,我可以在QtCreator np上使用该版本。我可以使用非过时的VS2012编译器,但是我不能设置ctp编译器,它只是给我一个错误,它无法使用编译器。它不会自动检测到它,所以我必须将其添加为自定义编译器。我不明白这些设置的一半大声笑:)。如何在Visual Studio 11月CTP编译器中使用QTcreator?

回答

1
  • 在刚刚行后C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat

    1. @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%
    2. 行刚过:
      @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

    1. @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%
    2. 行刚过:
      @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而不是默认的。记住:要恢复到默认编译器,您应该删除这些插入的行!

相关问题