title: Failed to configure CMake with Visual Studio 2010 Express
body: <p>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 :</p>
  
  <blockquote>
    <p>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.</p>
    
    <p>It fails with the following output:</p>
    
    <p>Change Dir: C:/OpenCV2.2/build/CMakeFiles/CMakeTmp</p>
    
    <p>Run Build
    Command:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe<br>
    cmTryCompileExec2312584318.vcxproj /p:Configuration=Debug<br>
    /p:VisualStudioVersion=10.0</p>
    
    <p>Microsoft (R) Build Engine version 4.0.30319.17929</p>
    
    <p>[Microsoft .NET Framework, version 4.0.30319.17929]</p>
    
    <p>Copyright (C) Microsoft Corporation.  All rights reserved.</p>
    
    <p>Build started 30/05/2013 20:16:01.</p>
    
    <p>Project<br>
    "C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj"
    on node 1 (default targets).</p>
    
    <p>PrepareForBuild:</p>
  
  <pre><code>Creating directory "cmTryCompileExec2312584318.dir\Debug\".
  Creating directory "C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\Debug\".
  </code></pre>
    
    <p>InitializeBuildStatus:</p>
  
  <pre><code>Creating "cmTryCompileExec2312584318.dir\Debug\cmTryCompileExec2312584318.unsuccessfulbuild"
  </code></pre>
    
    <p>because "AlwaysCreate" was specified.</p>
    
    <p>ClCompile:</p>
  
  <pre><code>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
  </code></pre>
    
    <p>"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.</p>
  
  <pre><code>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
  </code></pre>
    
    <p>/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</p>
  
  <pre><code>testCCompiler.c
  </code></pre>
    
    <p>ManifestResourceCompile:</p>
  
  <pre><code>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
  </code></pre>
    
    <p>Link:</p>
  
  <pre><code>C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:QUEUE
  </code></pre>
    
    <p>/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 </p>
    
    <p>LINK : fatal error LNK1123: failure during conversion to COFF: file
    invalid   or corrupt<br>
    [C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj]</p>
    
    <p>Done Building Project<br>
    "C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj"
    (default targets) -- FAILED.</p>
    
    <p>Build FAILED.</p>
  
  <pre><code> "C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj"
  </code></pre>
    
    <p>(default target) (1) -></p>
    
    <p>(Link target) -> </p>
  
  <pre><code>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
  </code></pre>
    
    <p>[C:\OpenCV2.2\build\CMakeFiles\CMakeTmp\cmTryCompileExec2312584318.vcxproj]</p>
  
  <pre><code>  0 Warning(s)
    1 Error(s)
  </code></pre>
    
    <p>Time Elapsed 00:00:00.64</p>
    
    <p>CMake will not be able to correctly generate this project. Call
    Stack (most recent call first):   CMakeLists.txt:47 (project)</p>
    
    <p>Configuring incomplete, errors occurred!</p>
  </blockquote>
  
  <p>any advice?</p>