your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found

来源:互联网 发布:护肤品成分检测知乎 编辑:程序博客网 时间:2024/05/22 14:42
问题:
./build.sh -j2  后出现如下提示:

-- Check for working CXX compiler: CMAKE_CXX_COMPILER-NOTFOUND
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.

解决:
1. 安装g++:
sudo apt-get install g++

2. 设置编译器路径:
cmake -D CMAKE_CXX_COMPILER="g++" CMAKE -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX:PATH="/usr/local" .
原创粉丝点击