【发布时间】:2012-06-28 22:56:20
【问题描述】:
CMake Error: your C compiler: "/home/user/revision OLD/host/linux/x86/usr/bin/qcc" was not found.
Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: your CXX compiler: "/home/user/revision OLD/host/linux/x86/usr/bin/qcc" was not found.
Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
-- Configuring incomplete, errors occurred!
make: *** [cmake_check_build_system] Error 1
我将我的修订版本更改为新版本,即使它指的是修订版本 OLD 路径。我在 wiki FAQ 上阅读 他们建议像
$ cmake -G "Your Generator" -D CMAKE_C_COMPILER=gcc-4.2 -D CMAKE_CXX_COMPILER=g++-4.2 path/to/your/source
但是这样做的正确方法是什么?因为我听说有一些缺点,比如重置其他 FLAGS ?
我完全不知道 cmake。
【问题讨论】:
-
您尝试过使用
cmake -DCMAKE_C_COMPILER="/home/user/revision\ new/host/linux/x86/usr/bin/qcc" -DCMAKE_CXX_COMPILER="/home/user/revision\ new/host/linux/x86/usr/bin/qcc" <path>吗?我的猜测是 CMake 正在CC和CXX环境变量中找到OLD路径,也许也检查一下(echo $CC)?
标签: gcc compiler-construction cmake cross-compiling