我正在尝试使用CMake在Qt Creator中设置构建环境,但无论我尝试什么都无法使其进展。它会出现"配置问题"的错误。在General Messages部分展开详细信息后,看起来似乎无法编译测试c程序。
我没有看到我的Qt Creator配置有任何问题;过去我必须手动设置才能使用qmake来制作qt应用程序。这是成功的。以下是该配置。
实际的CMake文件内容似乎并不重要,所以我非常倾向于某些配置不正确。我尝试过调整工具链,但没有成功。有什么想法吗?
我没有看到我的Qt Creator配置有任何问题;过去我必须手动设置才能使用qmake来制作qt应用程序。这是成功的。以下是该配置。
这是一条完整的错误信息,通常显示在常规消息中;
Running Windows Runtime device detection.
No winrtrunner.exe found.
Running "C:\Program Files\CMake\bin\cmake.exe -E server "--pipe=\\.\pipe\{8454d5f3-9c7b-42c8-8f39-a6bfbbbdd562}" --experimental" in
C:\Users\Andrew\AppData\Local\Temp\QtCreator-l9Mfi9\qtc-cmake-XXUaBP1D.
The C compiler identification is MSVC 19.0.24215.1
The CXX compiler identification is MSVC 19.0.24215.1
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/x86_amd64/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/x86_amd64/cl.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/CMakeTestCCompiler.cmake:51 (message):
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
14.0/VC/BIN/x86_amd64/cl.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/Andrew/AppData/Local/Temp/QtCreator-l9Mfi9/qtc-cmake-XXUaBP1D/CMakeFiles/CMakeTmp
Run Build Command:"nmake" "/NOLOGO" "cmTC_2c22c\fast"
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f
CMakeFiles\cmTC_2c22c.dir\build.make /nologo -L
CMakeFiles\cmTC_2c22c.dir\build
Building C object CMakeFiles/cmTC_2c22c.dir/testCCompiler.c.obj
C:\PROGRA~2\MICROS~1.0\VC\BIN\X86_AM~1\cl.exe
@C:\Users\Andrew\AppData\Local\Temp\nm7672.tmp
testCCompiler.c
Linking C executable cmTC_2c22c.exe
"C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe
--intdir=CMakeFiles\cmTC_2c22c.dir --manifests --
C:\PROGRA~2\MICROS~1.0\VC\bin\X86_AM~1\link.exe /nologo
@CMakeFiles\cmTC_2c22c.dir\objects1.rsp
@C:\Users\Andrew\AppData\Local\Temp\nm76B2.tmp
MT failed to run.
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' :
return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
Configuring incomplete, errors occurred!
See also "C:/Users/Andrew/AppData/Local/Temp/QtCreator-l9Mfi9/qtc-cmake-XXUaBP1D/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Andrew/AppData/Local/Temp/QtCreator-l9Mfi9/qtc-cmake-XXUaBP1D/CMakeFiles/CMakeError.log".
实际的CMake文件内容似乎并不重要,所以我非常倾向于某些配置不正确。我尝试过调整工具链,但没有成功。有什么想法吗?