Cmake突然編譯什麼都不成功 CMake Error at ...CMakeTestCCompiler.cmake:61 (message)

問題簡述如下:

CMake Error at D:....../cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "D:/vs2010 setup/VC/bin/cl.exe" is not able to compile a
  simple test program.
 
  It fails with the following output:
 
   Change Dir: D:/OpenCV/binaries/CMakeFiles/CMakeTmp
..........
LINK : fatal error LNK1123: failure during conversion to COFF: file  invalid or corrupt
解決辦法:
http://wenda.so.com/q/1412501061727248
在電腦裏面搜索
C:\Program Files\Microsoft Visual Studio 10.0\VC\bin
C:\Windows\winsxs\x86_netfx-cvtres_for_vc_and_vb_...(我目錄下有3個類似的,隨便選了一個)
C:\Windows\Microsoft.NET\Framework\v4.0.30319(我沒管第三個)
這三個路徑裏面都有cvtres.exe文件,嘗試使用第二個路徑裏面的文件替換第一個路徑的文件,問題解決。
(這個問題是windows自動更新造成編譯器cvtres.exe的版本過低,如果windows再次更新,則還可能出現這樣的問題,屆時再重複一下上述步驟即可。)


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章