繁体   English   中英

将编译器更改为Clang

[英]Changing Compiler to Clang

好的,我正在尝试安装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++更改为实际路径即可。

只需将正确的路径设置为CMAKE_C_COMPILERCMAKE_CXX_COMPILER 您可以在CMakeLists.txt或使用-D的命令行中完成此操作

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM