无法让 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_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 的 gcc 和 g++
- CMake 3.4.1
我不知道可能是什么问题,我在网上广泛查看但没有找到任何人找到解决方案的地方,除非它与路径问题有关,其中路径包含非-拉丁字符或没有写访问权限,对于任何有问题的目录都不是这种情况。我真的要完全放弃让这个工作,但我不知道该怎么做,因为我绝对需要这个项目的 socket.io C++ 客户端。
CMake 是一个实用程序,可以为不同的构建系统生成 "makefile"。在这里你生成了一个 nmake makefile 并且你的路径中似乎没有 nmake。
您可以使用选项 -G "MinGW Makefiles"
启动 CMake,以生成与 mingw make 兼容的 makefile。然后发出命令:
mingw32-make
这是我遇到的错误:
-- 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 的 gcc 和 g++
- CMake 3.4.1
我不知道可能是什么问题,我在网上广泛查看但没有找到任何人找到解决方案的地方,除非它与路径问题有关,其中路径包含非-拉丁字符或没有写访问权限,对于任何有问题的目录都不是这种情况。我真的要完全放弃让这个工作,但我不知道该怎么做,因为我绝对需要这个项目的 socket.io C++ 客户端。
CMake 是一个实用程序,可以为不同的构建系统生成 "makefile"。在这里你生成了一个 nmake makefile 并且你的路径中似乎没有 nmake。
您可以使用选项 -G "MinGW Makefiles"
启动 CMake,以生成与 mingw make 兼容的 makefile。然后发出命令:
mingw32-make