2015-4-30 用 CMake 3.2版本、3.0版本,编译出错
The C compiler identification is MSVC 16.0.30319.1
The CXX compiler identification is MSVC 16.0.30319.1
Check for working C compiler using: Visual Studio 10 2010 Win64
Check for working C compiler using: Visual Studio 10 2010 Win64 -- broken
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
10.0/VC/bin/x86_amd64/cl.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: F:/itkDevelop/itk-bin/CMakeFiles/CMakeTmp
Run Build
Command:"C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe"
"cmTryCompileExec2062377136.vcxproj" "/p:Configuration=Debug"
"/p:VisualStudioVersion=10.0"
Microsoft(R) 生成引擎版本 4.0.30319.34209
[Microsoft .NET Framework 版本 4.0.30319.34209]
版权所有 (C) Microsoft Corporation。保留所有权利。
生成启动时间为 2015-4-30 15:26:05。
节点 1
上的项目“F:\itkDevelop\itk-bin\CMakeFiles\CMakeTmp\cmTryCompileExec2062377136.vcxproj”(默认目标)。
PrepareForBuild:
正在创建目录“cmTryCompileExec2062377136.dir\Debug\”。
正在创建目录“F:\itkDevelop\itk-bin\CMakeFiles\CMakeTmp\Debug\”。
InitializeBuildStatus:
正在创建“cmTryCompileExec2062377136.dir\Debug\cmTryCompileExec2062377136.unsuccessfulbuild”,因为已指定“AlwaysCreate”。
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec2062377136.dir\Debug\\" /Fd"cmTryCompileExec2062377136.dir\Debug\vc100.pdb" /Gd /TC /errorReport:queue testCCompiler.c
Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D _DEBUG /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec2062377136.dir\Debug\\" /Fd"cmTryCompileExec2062377136.dir\Debug\vc100.pdb" /Gd /TC /errorReport:queue testCCompiler.c
testCCompiler.c
testCCompiler.c : fatal error C1902: 程序数据库管理器不匹配;请检查安装
[F:\itkDevelop\itk-bin\CMakeFiles\CMakeTmp\cmTryCompileExec2062377136.vcxproj]
已完成生成项目“F:\itkDevelop\itk-bin\CMakeFiles\CMakeTmp\cmTryCompileExec2062377136.vcxproj”(默认目标)的操作
- 失败。
生成失败。
“F:\itkDevelop\itk-bin\CMakeFiles\CMakeTmp\cmTryCompileExec2062377136.vcxproj”(默认目标)
(1) ->
(ClCompile 目标) ->
testCCompiler.c : fatal error C1902: 程序数据库管理器不匹配;请检查安装 [F:\itkDevelop\itk-bin\CMakeFiles\CMakeTmp\cmTryCompileExec2062377136.vcxproj]
0 个警告
1 个错误
已用时间 00:00:00.20
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:11 (project)
Configuring incomplete, errors occurred!
See also "F:/itkDevelop/itk-bin/CMakeFiles/CMakeOutput.log".
See also "F:/itkDevelop/itk-bin/CMakeFiles/CMakeError.log".
testCCompiler.c : fatal error C1902: 程序数据库管理器不匹配--解决办法
到C:/Program Files/Microsoft Visual Studio 10.0/Common7/IDE下面拷贝mspdbsrv.exe到C:/Program Files/Microsoft Visual Studio 10.0/VC/bin下面,重启VS即可。
LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏--解决办法
删除...\Microsoft Visual Studio 2010\VC\bin
下面的那个cvtres.exe就好了。