无法使用Visual Studio 2010 Express配置CMake [英] Failed to configure CMake with Visual Studio 2010 Express
问题描述
有人可以帮助我,我试图配置CMake与Visual Studio 2010速成版,但它失败。整个错误信息如下:
C编译器标识是MSVC 16.0.30319.1 CXX编译器
标识是MSVC 16.0。 30319.1检查工作C编译器
使用:Visual Studio 10检查工作C编译器使用:Visual
Studio 10 - 打破CMake错误在C:/ Program Files / CMake
2.8 / share / cmake-2.8 / Modules / CMakeTestCCompiler.cmake:61(消息):C编译器C:/ Program Files / Microsoft Visual Studio
10.0 / VC / bin / cl.exe无法编译一个简单的测试
更改目录:C:/OpenCV2.2/build / CMakeFiles / CMakeTmp
运行Build
命令:C:\Windows \Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
cmTryCompileExec2312584318.vcxproj / p:Configuration = Debug
/p:VisualStudioVersion=10.0
Microsoft(R)Build Engine版本4.0.30319.17929
[Microsoft .NET Framework,版本4.0.30319.17929]
版权所有公司。保留所有权利。
Build started 30/05/2013 20:16:01。
Project
C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj
在节点1(默认目标)上。
PrepareForBuild:
创建目录cmTryCompileExec2312584318.dir\Debug\。
创建目录C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\Debug\。
InitializeBuildStatus:
code>创建cmTryCompileExec2312584318.dir\Debug\cmTryCompileExec2312584318.unsuccessfulbuild
C:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' Program Files \Microsoft Visual Studio 10.0 \VC\bin\CL.exe / 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\"cmTryCompileExec2312584318.dir\Debug\
/Fd\"C:/OpenCV2.2/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec2312584318。 pdb
/ Gd / TC / analyze- / errorReport:queue testCCompiler.c
Microsoft(R)32位C / C ++优化编译器版本16.00.30319.01 for 80x86
版权所有(C)微软公司。保留所有权利。cl / c / Zi / W3 / WX- / Od / Ob0 / Oy- / D WIN32 / D _WINDOWS / D _DEBUG / DCMAKE_INTDIR = \Debug \/ D _MBCS / Gm- / RTC1 / MDd / GS / fp:precise
/ Zc:wchar_t / Zc:forScope /Fo\"cmTryCompileExec2312584318.dir\Debug\
/Fd\"C:/OpenCV2.2/build/CMakeFiles/ CMakeTmp / Debug / cmTryCompileExec2312584318.pdb
/ Gd / TC / analyze- / errorReport:queue testCCompiler.ctestCCompiler.c
ManifestResourceCompile:
C:\Program Files \Microsoft SDKs\Windows\v7.0A\bin\rc.exe / nologo /fo\"cmTryCompileExec2312584318.dir\Debug\cmTryCompileExec2312584318.exe .embed.manifest.rescmTryCompileExec2312584318.dir\Debug\cmTryCompileExec2312584318_manifest.rc
链接: / p>
C:\Program Files \ Microsoft Visual Studio 10.0 \VC\bin\link.exe / ERRORREPORT:QUEUE
/ OUT:C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\\ \\Debug\cmTryCompileExec2312584318.exe
/ INCREMENTAL / NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
/ MANIFEST
/ManifestFile:\"cmTryCompileExec2312584318.dir\Debug\cmTryCompileExec2312584318.exe.intermediate.manifest/ MANIFESTUAC:level ='asInvoker'uiAccess ='false'/ DEBUG
/PDB:\"C:/OpenCV2.2/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec2312584318.pdb
/ SUBSysTEM:CONSOLE / TLBID:1 / DYNAMICBASE / NXCOMPAT
/ IMPLIB:C: /OpenCV2.2/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec2312584318.lib
/ MACHINE:X86
cmTryCompileExec2312584318.dir\Debug\cmTryCompileExec2312584318.exe.embed.manifest.res
cmTryCompileExec2312584318.dir\Debug\testCCompiler.obj / machine:X86 / debug
LINK:致命错误LNK1123:转换为COFF时失败:file
无效或损坏
[C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj]
完成建筑项目
C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj
(默认目标) - FAILED。
建立失败。
C:\OpenCV2.2\build\CMakeFiles\ CMakeTmp\cmTryCompileExec2312584318.vcxproj
(默认目标)(1) - >
(链接目标) - >
LINK:致命错误LNK1123: COFF:文件无效或损坏
[C:\OpenCV2.2\build\CMakeFiles\\ \\ CMakeTmp\cmTryCompileExec2312584318.vcxproj]
0警告
1错误
时间已过00:00:00.64
能够正确地生成这个项目。调用
堆栈(最近一次调用):CMakeLists.txt:47(项目)
配置不完整,发生错误
解决方案安装 Windows 7 SDK ,然后安装 VC-Compiler-KB2519277 。修复了我的问题。
Can somebody help me please, I am trying to configure CMake with Visual Studio 2010 Express but it's failed. The whole error message is bellow :
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 Check for working C compiler using: Visual Studio 10 -- broken CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "C:/Program Files/Microsoft Visual Studio 10.0/VC/bin/cl.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/OpenCV2.2/build/CMakeFiles/CMakeTmp
Run Build Command:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
cmTryCompileExec2312584318.vcxproj /p:Configuration=Debug
/p:VisualStudioVersion=10.0Microsoft (R) Build Engine version 4.0.30319.17929
[Microsoft .NET Framework, version 4.0.30319.17929]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 30/05/2013 20:16:01.
Project
"C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj" on node 1 (default targets).PrepareForBuild:
Creating directory "cmTryCompileExec2312584318.dir\Debug\". Creating directory "C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\Debug\".
InitializeBuildStatus:
Creating "cmTryCompileExec2312584318.dir\Debug\cmTryCompileExec2312584318.unsuccessfulbuild"
because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\CL.exe /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"cmTryCompileExec2312584318.dir\Debug\" /Fd"C:/OpenCV2.2/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec2312584318.pdb" /Gd /TC /analyze- /errorReport:queue testCCompiler.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved.
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"cmTryCompileExec2312584318.dir\Debug\" /Fd"C:/OpenCV2.2/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec2312584318.pdb" /Gd /TC /analyze- /errorReport:queue testCCompiler.c
testCCompiler.c
ManifestResourceCompile:
C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /nologo /fo"cmTryCompileExec2312584318.dir\Debug\cmTryCompileExec2312584318.exe.embed.manifest.res" cmTryCompileExec2312584318.dir\Debug\cmTryCompileExec2312584318_manifest.rc
Link:
C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:QUEUE
/OUT:"C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec2312584318.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /ManifestFile:"cmTryCompileExec2312584318.dir\Debug\cmTryCompileExec2312584318.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:/OpenCV2.2/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec2312584318.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/OpenCV2.2/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec2312584318.lib" /MACHINE:X86 cmTryCompileExec2312584318.dir\Debug\cmTryCompileExec2312584318.exe.embed.manifest.res cmTryCompileExec2312584318.dir\Debug\testCCompiler.obj /machine:X86 /debug
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
[C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj]Done Building Project
"C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj" (default targets) -- FAILED.Build FAILED.
"C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj"
(default target) (1) ->
(Link target) ->
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
[C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj]
0 Warning(s) 1 Error(s)
Time Elapsed 00:00:00.64
CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:47 (project)
Configuring incomplete, errors occurred!
any advice?
解决方案Install the windows 7 SDK then install VC-Compiler-KB2519277. Fixed the issue for me.
这篇关于无法使用Visual Studio 2010 Express配置CMake的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!