无法让 CMAKE 编译项目
Can't get CMAKE to compile a project
这是我得到的错误:
-- 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".
我使用的记录:
MinGW 4.8.1中的gcc和g++我不知道可能是什么问题,我在网上进行了广泛的搜索,没有发现任何地方有人得到了解决方案,除非是与路径问题有关的情况,其中路径包含非拉丁字符或没有写访问权限,而任何有问题的目录都不是这样。我真的很想完全放弃让它发挥作用,但我不知道该怎么办,因为我绝对需要这个项目的C++的socket.io客户端。
CMake是一个为不同构建系统生成"makefile"的实用程序。在这里,您生成了一个nmake makefile,并且您的路径中似乎没有nmake。
您可以使用选项-G "MinGW Makefiles"
启动CMake,以便生成与mingw-make兼容的makefile。然后发出命令:
mingw32-make
相关文章:
- 当我尝试通过 mingw 使用 CMake 和 SFML 库编译项目时出错
- LD:尝试编译项目时找不到架构x86_64符号
- 如何在不需要LIBCD.lib的情况下在Visual Studio 6中编译C项目
- 如何使用 Makefile 使用 VTK 库编译项目?
- UE4无法使用vs2017编译C++项目
- 无法让 CMAKE 编译项目
- 了解如何编译C++项目
- [UE4错误]无法编译项目.你想在Visual Studio中打开它吗?
- 使用 -O1 优化标志编译项目时共享库崩溃
- 每次都构建(make)lib,只有在lib较新时才重新编译项目
- 如何在 g++ 上使用 opencv 编译项目 c++
- 尝试使用 TMXlite 编译项目时LNK2019错误
- 编译项目时文件无效或损坏,包括 V8
- 为什么当我在Visual Studio中编译C++项目时会出现致命错误"LNK1104:无法打开文件'cryptlib.lib'?
- 在 netbeans 中编译项目中的单个文件
- 用cmake中的makefile编译项目
- 使用makefile编译C++项目时出现问题
- 用多个文件制作和编译C 项目
- 如何有条件地为 Eclipse 中的交叉编译项目包含两个不同名称的相同版本的库
- 如何编译项目后不运行exe文件