Compiler construction 缺少变量cmake_3_编译器kdevelop cmake
我曾经在LinuxMint上使用Kdevelop,效果很好。现在我重新安装了Linux,但我无法让Kdevelop和cmake正常工作 编译时,会出现以下错误:Compiler construction 缺少变量cmake_3_编译器kdevelop cmake,compiler-construction,cmake,kdevelop,Compiler Construction,Cmake,Kdevelop,我曾经在LinuxMint上使用Kdevelop,效果很好。现在我重新安装了Linux,但我无法让Kdevelop和cmake正常工作 编译时,会出现以下错误: make: *** No targets specified and no makefile found. Stop. 当我尝试配置cmake时,我得到: /home/benedikt/projects/Exercise 3/build> /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/l
make: *** No targets specified and no makefile found. Stop.
当我尝试配置cmake时,我得到:
/home/benedikt/projects/Exercise 3/build> /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debug /home/benedikt/projects/Exercise 3/
-- Configuring incomplete, errors occurred!
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_3_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_3_COMPILER
CMake Error: Could not find cmake module file:/home/benedikt/projects/Exercise 3/build/CMakeFiles/CMake3Compiler.cmake
CMake Error: Could not find cmake module file:CMake3Information.cmake
CMake Error: CMAKE_3_COMPILER not set, after EnableLanguage
我必须将变量设置为什么,在哪里设置
编辑:
CMakeList.txt是:
project(exercise 3)
add_executable(exercise 3 main.cpp)
看一看
它的第一个参数是项目名称,其他参数是使用的语言。CMake认为3
是一种编程语言,并试图找到它的编译器
从项目名称中删除空格或使用引号:
project(“练习3”)
能否从练习3
目录中显示CMakeLists.txt
?