cmake OpenGL构建错误:LINK:致命错误LNK1123:转换为COFF期间失败

时间:2014-02-18 12:11:14

标签: c++ opengl cmake

我已经在the OpenGL tutorial here中逐步完成了所有操作,但在尝试使用CMAKE构建教程时,我一直收到此错误。

Determining if the C compiler works failed with the following output:
Change Dir: C:/Programming/C++/OpenGL/OpenGL-tutorial_v0014_33/CMakeFiles/CMakeTmp

Run Build Command:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe cmTryCompileExec1900997581.vcxproj /p:Configuration=Debug /p:VisualStudioVersion=10.0
Microsoft (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 2/19/2014 12:59:05 AM.

Project "C:\Programming\C++\OpenGL\OpenGL-tutorial_v0014_33\CMakeFiles\CMakeTmp\cmTryCompileExec1900997581.vcxproj" on node 1 (default targets).

PrepareForBuild:

  Creating directory "cmTryCompileExec1900997581.dir\Debug\".

  Creating directory "C:\Programming\C++\OpenGL\OpenGL-tutorial_v0014_33\CMakeFiles\CMakeTmp\Debug\".

InitializeBuildStatus:

  Creating "cmTryCompileExec1900997581.dir\Debug\cmTryCompileExec1900997581.unsuccessfulbuild" because "AlwaysCreate" was specified.

ClCompile:

  C:\Program Files (x86)\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"cmTryCompileExec1900997581.dir\Debug\\" /Fd"cmTryCompileExec1900997581.dir\Debug\vc100.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"cmTryCompileExec1900997581.dir\Debug\\" /Fd"cmTryCompileExec1900997581.dir\Debug\vc100.pdb" /Gd /TC /analyze- /errorReport:queue testCCompiler.c



  testCCompiler.c

ManifestResourceCompile:

  C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /nologo /fo"cmTryCompileExec1900997581.dir\Debug\cmTryCompileExec1900997581.exe.embed.manifest.res" cmTryCompileExec1900997581.dir\Debug\cmTryCompileExec1900997581_manifest.rc 

Link:

  C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"C:\Programming\C++\OpenGL\OpenGL-tutorial_v0014_33\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec1900997581.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:"cmTryCompileExec1900997581.dir\Debug\cmTryCompileExec1900997581.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:/Programming/C++/OpenGL/OpenGL-tutorial_v0014_33/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec1900997581.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/Programming/C++/OpenGL/OpenGL-tutorial_v0014_33/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec1900997581.lib" /MACHINE:X86 cmTryCompileExec1900997581.dir\Debug\cmTryCompileExec1900997581.exe.embed.manifest.res

  cmTryCompileExec1900997581.dir\Debug\testCCompiler.obj  /machine:X86 /debug 

LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [C:\Programming\C++\OpenGL\OpenGL-tutorial_v0014_33\CMakeFiles\CMakeTmp\cmTryCompileExec1900997581.vcxproj]

Done Building Project "C:\Programming\C++\OpenGL\OpenGL-tutorial_v0014_33\CMakeFiles\CMakeTmp\cmTryCompileExec1900997581.vcxproj" (default targets) -- FAILED.



Build FAILED.



"C:\Programming\C++\OpenGL\OpenGL-tutorial_v0014_33\CMakeFiles\CMakeTmp\cmTryCompileExec1900997581.vcxproj" (default target) (1) ->

(Link target) -> 

  LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [C:\Programming\C++\OpenGL\OpenGL-tutorial_v0014_33\CMakeFiles\CMakeTmp\cmTryCompileExec1900997581.vcxproj]



    0 Warning(s)

    1 Error(s)



Time Elapsed 00:00:00.71

0 个答案:

没有答案