对于Windows的CMake 2.8.10.2只是拒绝使用Visual Studio 2012(在Windows 7下)为我配置项目CMake与Visual Studio 2012/2013中断?
看起来CMake添加了一些Microsoft编译器不再支持的设置。 LINK:致命错误LNK1117:语法错误的选项“清单:嵌入”
我尝试,得到了相同的结果有一个非常基本的CMake文件
cmake_minimum_required (VERSION 2.6)
add_executable(test test.cpp)
是否有变通?
输出窗口显示:
The C compiler identification is MSVC 17.0.51106.1
The CXX compiler identification is MSVC 17.0.51106.1
Check for working C compiler using: Visual Studio 11
Check for working C compiler using: Visual Studio 11 -- broken
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
11.0/VC/bin/cl.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/tmp/testCmake/build/CMakeFiles/CMakeTmp
Run Build Command:C:\PROGRA~2\MICROS~2.0\Common7\IDE\devenv.com
CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec3122367237
Microsoft (R) Microsoft Visual Studio 2012 Version 11.0.51106.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: cmTryCompileExec3122367237, Configuration:
Debug Win32 ------
1> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01
for 80x86
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> cl /c /Zi /W3 /WX- /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D _DEBUG /D
"CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise
/Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec3122367237.dir\Debug\\"
/Fd"C:/tmp/testCmake/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec3122367237.pdb"
/Gd /TC /analyze- /errorReport:prompt /Zm1000 testCCompiler.c
1>
1> testCCompiler.c
1>LINK : fatal error LNK1117: syntax error in option 'manifest:embed'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
==========
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
Configuring incomplete, errors occurred!
我一直在使用VS2012超过1个月的几个项目。 VTK,ITK,DCMTK,GDCM都可以和我的代码一起构建。我正在使用CMake 2.8.10.2。虽然我很少再为32位构建。 – drescherjm 2013-04-10 13:54:35
我也使用CMake与Visual Studio 2012相当长一段时间没有问题。我几天前重新安装了Visual Studio,安装了最新的更新,然后问题浮出水面。 – jgaa 2013-04-10 14:07:47
从错误消息:无法找到cl.exe(VS C++编译器) - 您的cl.exe安装在哪里?尝试使用cl编译命令行(如此处所述:http://stackoverflow.com/questions/7865432/command-line-compile-using-cl-exe)以确定您的编译器是否正在工作。也许你的VS安装搞砸了。 – Vertexwahn 2013-08-14 19:44:12