首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >建立Kdevelop

建立Kdevelop
EN

Stack Overflow用户
提问于 2017-03-23 22:38:37
回答 1查看 1.8K关注 0票数 1

我正在尝试设置Kdevelop,并得到一个编译器错误。

代码语言:javascript
复制
C:/Users/alexm/projects/SFMLGL/build> "C:/Program Files/CMake/bin/cmake.exe" "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" "-DCMAKE_BUILD_TYPE=Debug" C:/Users/alexm/projects/SFMLGL
-- The C compiler identification is unknown
CMake Error at C:/Program Files/CMake/share/cmake-3.6/Modules/CMakeDetermineCompilerId.cmake:141 (file):
  file problem creating directory:
  C:/Users/alexm/projects/SFMLGL/build/CMakeFiles/3.6.1/CompilerIdCXX
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.6/Modules/CMakeDetermineCompilerId.cmake:40 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  C:/Program Files/CMake/share/cmake-3.6/Modules/CMakeDetermineCXXCompiler.cmake:113 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:2 (project)


-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:2 (project):
  The CMAKE_C_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  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.


CMake Error at CMakeLists.txt:2 (project):
  The CMAKE_CXX_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_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 "C:/Users/alexm/projects/SFMLGL/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/alexm/projects/SFMLGL/build/CMakeFiles/CMakeError.log".
*** Failure: Exit code 1 ***

我已经在谷歌上搜索了很多,并且读到我应该下载"Make",所以我已经下载了,它确实减少了我的错误数量,但是我仍然有这个,我一个字也不懂。

我想它想让我下载一个C编译器?我该怎么做呢?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-03-23 23:27:26

CMake的默认工具链尝试使用Visual C++编译器。

如果您想使用Visual (您需要安装它),可以从“开始”菜单中的“VS201X本机工具命令”命令提示快捷键运行CMake命令。

另一种选择是使用GCC的Windows通过明明威64,这是可在msys2。在那里,您必须通过pacman -S mingw-w64-x86_64-toolchain安装编译器,也可以通过pacman -S mingw-w64-x86_64-cmake安装cmake。

然后可以从mingw64提示符msys2运行命令。

如果您想在KDevelop中使用它,您必须将msys64 64/mingw64 64/文件夹添加到路径中,或者从上面提到的Visual命令提示符启动它。我不确定是否有更简单的方法。

你的问题提出了一个问题^^你最终想要实现什么。您似乎不知道要使用哪个编译器(如果您有二进制依赖关系,这可能很重要)或什么是make (这有点令人担忧)。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42988278

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档