Cmake突然编译什么都不成功 CMake Error at ...CMakeTestCCompiler.cmake:61 (message)

来源:互联网 发布:教学视频录制软件 编辑:程序博客网 时间:2024/06/05 17:10

问题简述如下:

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再次更新,则还可能出现这样的问题,届时再重复一下上述步骤即可。)


0 0
原创粉丝点击