CMAKE2.8.12+VS2010配置问题

tianyi2012 2014-04-04 04:32:41
问题:我在cmake2.8.12中配置好文件,运行就出现如下问题:谁能帮着解决一下啊
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/cmake-2.8.12-win32-x86/share/cmake- 2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "D:/Program Files/Microsoft Visual Studio10.0/VC/bin/cl.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: E:/PCL/cmake-bin/CMakeFiles/CMakeTmp

Run Build Command:D:\PROGRA~1\MICROS~1.0\Common7\IDE\devenv.com
CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec3283164848
Microsoft(R) Visual Studio 10.0.30319.1 版。
版权所有(C) Microsoft Corp。保留所有权利。
1>------ 已启动生成: 项目: cmTryCompileExec3283164848, 配置: Debug Win32 ------
1> 用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.30319.01 版
1> 版权所有(C) Microsoft Corporation。保留所有权利。
1>
1> 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"cmTryCompileExec3283164848.dir\Debug\\"
/Fd"cmTryCompileExec3283164848.dir\Debug\vc100.pdb" /Gd /TC /analyze-
/errorReport:prompt testCCompiler.c
1>
1> testCCompiler.c
1>LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
Configuring incomplete, errors occurred!
See also "E:/PCL/cmake-bin/CMakeFiles/CMakeOutput.log".
See also "E:/PCL/cmake-bin/CMakeFiles/CMakeError.log".
...全文
629 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
donghellokitty 2016-05-05
  • 打赏
  • 举报
回复
怎么卸载NET4.5 重装4.0呢
qq_21415587 2015-11-23
  • 打赏
  • 举报
回复
我也出现和你一样的问题,,你是怎么解决的呢。。。请教!
tianyi2012 2014-04-06
  • 打赏
  • 举报
回复
很好,这个问题我解决了。多谢@刘二毛 博主的博客:http://blog.csdn.net/zwlq1314521/article/details/19199613?reload 在用cmake编译opencv出现的错误 The CXX compiler identification is MSVC 16.0.30319.1 The C compiler identification is MSVC 16.0.30319.1 Check for working CXX compiler using: Visual Studio 10 Check for working CXX compiler using: Visual Studio 10 -- broken CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:54 (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. 查了很多资料,发现原来是因为我的电脑上同时装了vs2010和vs2012 vs2012自带的.NET4.5替换了原有的.NET,我卸载了vs2012以及.NET4.5组件,重新安装.NET4.0,再次Configure就好了。
tianyi2012 2014-04-06
  • 打赏
  • 举报
回复
来个人帮忙解决一下吧

64,282

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧