我曾经在 Linux Mint 上使用 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)