cmake The C compiler identification is unknown


 

 本地安装有Visual Studio 2015 ,同时更新了update 3

执行上述报错

本地还安装Visual Studio 2017 使用cmake 没问题

分析:

在CMakeFiles/CMakeError.log文件中可以找到下面错误

LINK : fatal error LNK1158: 无法运行“rc.exe”

  

原因:

在C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin 路径中没有找到rc.exe 程序

解决方案:

从C:\Program Files (x86)\Windows Kits\8.1\bin\x86 目录拷贝以下文件到上述目录中可解决问题

  1. rc.exe
    rcdll.dll

     

参考链接:

https://blog.csdn.net/uranus1024/article/details/78430308


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM