【发布时间】:2023-03-16 03:33:02
【问题描述】:
我正在关注 thread 和 one 来构建我自己的 KDE,而无需 sudo 许可。由于工作站上没有安装 Git 和 CMake。我只是将它们都安装在 /home/cmake ~/kde-devel/src/kdelibs -DCMAKE_INSTALL_PREFIX=/home/<user>。此时我收到以下错误:
> ~/bin/cmake ~/kde-devel/src/kdelibs -DCMAKE_INSTALL_PREFIX=/home/<user>
-- The CXX compiler identification is unknown
-- Check for working CXX compiler: /home/gnu/bin/c++
-- Check for working CXX compiler: /home/gnu/bin/c++ -- broken
CMake Error at /home/<user>/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:45 (MESSAGE):
The C++ compiler "/home/gnu/bin/c++" is not able to compile a simple test
program.
It fails with the following output:
Change Dir: /home/<user>/kde-devel/build/kdelibs/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast"
...
我检查了有 2 个 C++ 编译器:
> where c++
/home/gnu/bin/c++
/usr/bin/c++
我应该将 CMake 默认 C++ 编译器设置为 /usr/bin/c++ 吗?如何?或者有什么办法可以解决这个问题?
【问题讨论】: