本文介绍了无法让CMAKE编译项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下是我收到的错误:
-- Building for: NMake Makefiles
-- The C compiler identification is GNU 4.8.1
-- The CXX compiler identification is GNU 4.8.1
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
CMake Error: Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTC_86068fast"
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/--REDACTED--/CMakeFiles/CMakeTmp
Run Build Command:"nmake" "/NOLOGO" "cmTC_86068fast"
The system cannot find the file specified
Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTC_86068fast"
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (PROJECT)
-- Configuring incomplete, errors occurred!
See also "C:/--REDACTED--/socket.io-client-cpp-1.6.1/CMakeFiles/CMakeOutput.log".
See also "C:/--REDACTED--/socket.io-client-cpp-1.6.1/CMakeFiles/CMakeError.log".
对于我使用的记录:
- MinGW4.8.1的GCC和g++
- CMake 3.4.1
推荐答案
cmake是一个为不同生成系统生成"生成文件"的实用程序。在这里,您生成了一个nmake makefile,并且您的路径中似乎没有nmake。
您可以使用选项-G "MinGW Makefiles"
启动CMake,以便生成与mingw make兼容的Makefile。然后发出命令:
mingw32-make
这篇关于无法让CMAKE编译项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!