CMake Error at CMakeLists.txt:52 (PROJECT): No CMAKE_CXX_COMPILER could be found.

every blog every motto: You will never know unless you try

0. 前言

编译OSG出现错误,

1. 正文

出现如下错误:

CMake Error at CMakeLists.txt:52 (PROJECT):   No CMAKE_CXX_COMPILER could be found.

解决思路:

法一:

可能vs安装路径有中文,检查并重新安装

法二:

个人猜想:
找不到vs中的编译器,点击cmake中的configure,然后选择vs中的cl.exe
说明: 上面这步还没有做,仅打开了文件夹(如下图),点击configure进行配置就可以了
在这里插入图片描述

参考文献

[1] https://www.zhihu.com/question/53353841?sort=created

猜你喜欢

转载自blog.csdn.net/weixin_39190382/article/details/108615673