gpt4 book ai didi

c++ - 将编译器更改为Clang

转载 作者:太空宇宙 更新时间:2023-11-04 12:13:28 25 4
gpt4 key购买 nike

好吧,我正试图安装一个WASM组件,我一直收到这个错误,我需要做什么?

cmake -DBINARYEN_BIN=~/binaryen/bin -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -DCMAKE_CXX_COMPILER=/path/to/c++ -DCMAKE_C_COMPILER=/path/to/cc -DCMAKE_BUILD_TYPE=Debug ..
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:2 (project):
The CMAKE_C_COMPILER:

/path/to/cc

is not a full path to an existing compiler tool.

Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!
See also "/home/Usr/eos/build/CMakeFiles/CMakeOutput.log".
See also "/home/Usr/eos/build/CMakeFiles/CMakeError.log".

最佳答案

解决这一问题的一步是按照错误日志的明确建议行事。
您需要告诉它您的gcc(或clang)编译器在哪里,您可以通过键入which gcc或根据标题的建议键入which clang来找到它。
然后对g++编译器执行同样的操作。
如果你没有这两个,你需要先安装它们。
然后将cmake命令中的/path/to/ccpath/to/c++更改为实际路径。

关于c++ - 将编译器更改为Clang,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48142871/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com