gpt4 book ai didi

cmake - 如何安装Cmake C编译器和CXX编译器

转载 作者:行者123 更新时间:2023-12-03 21:21:18 39 4
gpt4 key购买 nike

我需要一些使用cmake编译该项目的帮助。这是错误消息。

$ ./build_avida
-- Building for: NMake Makefiles
CMake Warning at CMakeLists.txt:1 (PROJECT):
To use the NMake generator, cmake must be run from a shell that can use the
compiler cl from the command line. This environment does not contain
INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
work.


CMake Error: CMake was unable to find a build program corresponding to "NMake Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:C:/Users/Desk/Dropbox/2012-2013/BCB504/AvidaProject/avidagit/avida/CMakeFiles/2.8.10.2/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:C:/Users/Desk/Dropbox/2012-2013/BCB504/AvidaProject/avidagit/avida/CMakeFiles/2.8.10.2/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
make: *** No rule to make target `install'. Stop.

最佳答案

尝试安装gccgcc-c++,因为Cmake可以顺利使用它们。

基于RedHat

yum install gcc gcc-c++


基于Debian / Ubuntu

apt-get install cmake gcc g++


然后,


删除“ CMakeCache.txt”
再次运行编译。

关于cmake - 如何安装Cmake C编译器和CXX编译器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14807294/

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