首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >无法让CMAKE编译项目

无法让CMAKE编译项目
EN

Stack Overflow用户
提问于 2018-07-11 06:32:50
回答 1查看 3.4K关注 0票数 2

下面是我得到的错误:

代码语言:javascript
复制
-- 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_86068\fast"
-- 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_86068\fast"

The system cannot find the file specified

Generator: execution of make failed.  Make command was: "nmake" "/NOLOGO" "cmTC_86068\fast"





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".

对于我正在使用的记录:

来自MinGW 4.8.1

  • CMake 3.4.1

  • gcc和g++

我不知道问题是什么,我在网上广泛查找,没有找到任何人已经找到解决方案的地方,除非它与路径问题有关,其中路径包含非拉丁字符或没有写访问权限,而任何有问题的目录都不是这种情况。我真的快要完全放弃让它工作了,但我不知道该怎么做,因为这个项目绝对需要C++的socket.io客户端。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-07-11 06:36:32

CMake是一个为不同的构建系统生成"makefile“的实用程序。这里你生成了一个nmake makefile,看起来你的路径中没有nmake。

您可以使用选项-G "MinGW Makefiles"启动CMake,以便生成与mingw make兼容的makefile。然后发出命令:

代码语言:javascript
复制
mingw32-make
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51274789

复制
相关文章

相似问题

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