我正在尝试从参考link为我的研讨会项目制作一个VS2010项目。我已按照控制台链接中描述的步骤进行操作,它也可以正常工作。我必须在visual studio中运行解决方案 我正在使用CMake(3.9.0)。但它始终给出相同的错误"错误 在配置过程中,项目文件可能无效"
错误详情
> The CXX compiler identification is MSVC 16.0.30319.1
Check for working CXX compiler: c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe
Check for working CXX compiler: c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.9/Modules/CMakeTestCXXCompiler.cmake:44 (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: C:/Users/Addy/Documents/polaris/build/CMakeFiles/CMakeTmp
Run Build
Command:"C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe"
"cmTC_8c6f6.vcxproj" "/p:Configuration=Debug" "/p:VisualStudioVersion=10.0"
Microsoft (R) Build Engine version 4.6.1055.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 01-Aug-17 3:06:20 PM.
Project
"C:\Users\Addy\Documents\polaris\build\CMakeFiles\CMakeTmp\cmTC_8c6f6.vcxproj"
on node 1 (default targets).
PrepareForBuild:
Creating directory "cmTC_8c6f6.dir\Debug\".
Creating directory "C:\Users\Addy\Documents\polaris\build\CMakeFiles\CMakeTmp\Debug\".
InitializeBuildStatus:
Creating "cmTC_8c6f6.dir\Debug\cmTC_8c6f6.unsuccessfulbuild" because "AlwaysCreate" was specified.
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 "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTC_8c6f6.dir\Debug\\" /Fd"cmTC_8c6f6.dir\Debug\vc100.pdb" /Gd /TP /errorReport:queue testCXXCompiler.cxx
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 "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"cmTC_8c6f6.dir\Debug\\" /Fd"cmTC_8c6f6.dir\Debug\vc100.pdb" /Gd /TP /errorReport:queue testCXXCompiler.cxx
testCXXCompiler.cxx
ManifestResourceCompile:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /nologo /fo"cmTC_8c6f6.dir\Debug\cmTC_8c6f6.exe.embed.manifest.res" cmTC_8c6f6.dir\Debug\cmTC_8c6f6_manifest.rc
Link:
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\Users\Addy\Documents\polaris\build\CMakeFiles\CMakeTmp\Debug\cmTC_8c6f6.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:"cmTC_8c6f6.dir\Debug\cmTC_8c6f6.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:/Users/Addy/Documents/polaris/build/CMakeFiles/CMakeTmp/Debug/cmTC_8c6f6.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/Users/Addy/Documents/polaris/build/CMakeFiles/CMakeTmp/Debug/cmTC_8c6f6.lib" /MACHINE:X64 cmTC_8c6f6.dir\Debug\cmTC_8c6f6.exe.embed.manifest.res
cmTC_8c6f6.dir\Debug\testCXXCompiler.obj /machine:x64
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid
or corrupt
[C:\Users\Addy\Documents\polaris\build\CMakeFiles\CMakeTmp\cmTC_8c6f6.vcxproj]
Done Building Project
"C:\Users\Addy\Documents\polaris\build\CMakeFiles\CMakeTmp\cmTC_8c6f6.vcxproj"
(default targets) -- FAILED.
Build FAILED.
"C:\Users\Addy\Documents\polaris\build\CMakeFiles\CMakeTmp\cmTC_8c6f6.vcxproj"
(default target) (1) ->
(Link target) ->
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [C:\Users\Addy\Documents\polaris\build\CMakeFiles\CMakeTmp\cmTC_8c6f6.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.51
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:4 (PROJECT)