0

I've done everything step by step in the OpenGL tutorial here, but I keep getting this error when trying to build the tutorial with 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
Filburt
  • 17,626
  • 12
  • 64
  • 115
  • 3
    Have you tried searching for the error (the phrase "failure during conversion to COFF") in your favorite search engine? It would probably list a few duplicates here on SO, as well as some answers on MSDN. – Some programmer dude Feb 18 '14 at 12:13
  • Yea, it said on a thread in MSDN to turn off incremental linking or install VS 2010. I have VS 2010 but I don't know how to turn off incremental linking for a project I'm building without opening the VS GUI. – user3323337 Feb 18 '14 at 22:28
  • To downvoter: I don't think "there must be a duplicate" is a good reason for downvote without linking to said duplicate. Or if there's no duplicate, then it is a valid SO question even if answer is available elsewhere too. – hyde Mar 04 '14 at 08:48
  • possible duplicate of [Error 'LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt' after installing Visual Studio 2012 Release Preview](http://stackoverflow.com/questions/10888391/error-link-fatal-error-lnk1123-failure-during-conversion-to-coff-file-inval) – hyde Mar 04 '14 at 08:49

0 Answers0