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

迷南。 2023-01-04 14:43 383阅读 0赞

此文为:此文为:轻松入门cmake系列教程

win10下使用cmake编译出现下面错误

  1. > cmake ..
  2. -- Building for: NMake Makefiles
  3. -- The CXX compiler identification is unknown
  4. CMake Error at CMakeLists.txt:10 (project):
  5. The CMAKE_CXX_COMPILER:
  6. cl
  7. is not a full path and was not found in the PATH.
  8. To use the NMake generator with Visual C++, cmake must be run from a shell
  9. that can use the compiler cl from the command line. This environment is
  10. unable to invoke the cl compiler. To fix this problem, run cmake from the
  11. Visual Studio Command Prompt (vcvarsall.bat).
  12. Tell CMake where to find the compiler by setting either the environment
  13. variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  14. to the compiler, or to the compiler name if it is in the PATH.
  15. -- Configuring incomplete, errors occurred!
  16. See also "C:/Users/oceanstar/software/yaml-cpp-master/build/CMakeFiles/CMakeOutput.log".
  17. See also "C:/Users/oceanstar/software/yaml-cpp-master/build/CMakeFiles/CMakeError.log".

解决方法:

  1. > cmake -G "MinGW Makefiles" ../

发表评论

表情:
评论列表 (有 0 条评论,383人围观)

还没有评论,来说两句吧...

相关阅读