Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Compiler construction 缺少变量cmake_3_编译器kdevelop cmake_Compiler Construction_Cmake_Kdevelop - Fatal编程技术网

Compiler construction 缺少变量cmake_3_编译器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

我曾经在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/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