1
我想用Cmake和MinGW的Clion设置一个环境。我在clion中进行配置,但是当我刷新时,我在下面得到错误。我应该提到,我是C/C++的新手,但是我已经按照说明设置了所需的东西,但由于某种原因它不起作用。我想编辑的是vox引擎的一个分支。我搜索了这个错误,但没有任何帮助我的东西。Clion和cmake编译错误
我试过设置路径C:\ MinGW \ bin,将工作目录移动到名称中没有空格的地方。还有其他的事情我也尝试过,但不能特别记住。
"D:\Gustav Olsson\Program\CLion 2016.3.2\bin\cmake\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" "D:\Gustav Olsson\Programming\Voxel"
-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
CMake Error: Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_f8fdc/fast"
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
CMake Error at D:/Gustav Olsson/Program/CLion 2016.3.2/bin/cmake/share/cmake-3.6/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: D:/Gustav Olsson/Programming/Voxel/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_f8fdc/fast"
Generator: execution of make failed. Make command was:
"C:/MinGW/bin/mingw32-make.exe" "cmTC_f8fdc/fast"
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
-- Configuring incomplete, errors occurred!
See also "D:/Gustav Olsson/Programming/Voxel/CMakeFiles/CMakeOutput.log".
See also "D:/Gustav Olsson/Programming/Voxel/CMakeFiles/CMakeError.log".
编辑: 最后几行从输出CMakeOutput.log
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"
The CXX compiler identification is GNU, found in "D:/Gustav Olsson/Programming/Voxel/CMakeFiles/3.6.3/CompilerIdCXX/a.exe"
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/MinGW/bin/gcc.exe
Build flags:
Id flags:
The output was:
0
输出CMakeError.log
Determining if the C compiler works failed with the following output:
Change Dir: D:/Gustav Olsson/Programming/Voxel/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_ae556/fast"
Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_ae556/fast"
Determining if the C compiler works failed with the following output:
Change Dir: D:/Gustav Olsson/Programming/Voxel/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_f8fdc/fast"
Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_f8fdc/fast"
Determining if the C compiler works failed with the following output:
Change Dir: D:/Gustav Olsson/Programming/Voxel/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_3f00c/fast"
Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_3f00c/fast"
感谢您的帮助提前
'我试图用Cmake和MinGW使用Clion来设置一个环境。“ - 但是您调用'cmake'来生成** CodeBlocks **项目:'-G”CodeBlocks - MinGW Makefiles“'。在显示的输出结尾处有“另请参阅”行。你看过这些文件吗?将文件'D:/ Gustav Olsson/Programming/Voxel/CMakeFiles/CMakeError.log'的内容添加到您的问题文章中。 – Tsyvarev
@Tsyvarev感谢您的回复,我发布了文件的输出,如何将'-G'CodeBlocks - MinGW Makefiles''更改为Clion而不是CodeBlocks? – Frothiny
在你可能想象的意义上,即使在最新的CMake中,Clion也没有生成器,所以你不能改变例如(我认为你可以想象做到这一点)'-G“CodeBlocks - MinGW Makefiles”'到'-G“Clion - MinGW Makefiles“'! – fedepad