尝试为我正在编写的c ++游戏构建一些有用的库。但是CMAKE不想使用我的编译器吗?
我正在运行OS Windows 7,试图为Windows 32构建库。我正在运行最新版本的CMAKE(32位(也没有运气64))我的编译器是Codeblocks MinGW编译器应该是32位的。
这是错误日志:
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/Program Files (x86)/CodeBlocks/MinGW/bin/gcc.exe
Build flags:
Id flags:
The output was:
1
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/Program Files (x86)/CodeBlocks/MinGW/bin/gcc.exe
Build flags:
Id flags: -c
The output was:
1
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/Program Files (x86)/CodeBlocks/MinGW/bin/gcc.exe
Build flags:
Id flags: -Aa
The output was:
1
<command-line>:0:1: error: missing '(' after predicate
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/Program Files (x86)/CodeBlocks/MinGW/bin/gcc.exe
Build flags:
Id flags: -D__CLASSIC_C__
The output was:
1
Checking whether the C compiler is IAR using "" did not match "IAR .+ Compiler":
gcc.exe: fatal error: no input files
compilation terminated.
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/Program Files (x86)/CodeBlocks/MinGW/bin/g++.exe
Build flags:
Id flags:
The output was:
1
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/Program Files (x86)/CodeBlocks/MinGW/bin/g++.exe
Build flags:
Id flags: -c
The output was:
1
Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
g++.exe: fatal error: no input files
compilation terminated.
Determining if the C compiler works failed with the following output:
Change Dir: C:/Program Files (x86)/TGUI/TGUI-Build/CMakeFiles/CMakeTmp
Run Build Command:"C:/PROGRA~2/CODEBL~1/MinGW/bin/mingw32-make.exe" "cmTC_9275e/fast"
C:/PROGRA~2/CODEBL~1/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_9275e.dir\build.make CMakeFiles/cmTC_9275e.dir/build
mingw32-make.exe[1]: Entering directory 'C:/Program Files (x86)/TGUI/TGUI-Build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_9275e.dir/testCCompiler.c.obj
C:\PROGRA~2\CODEBL~1\MinGW\bin\gcc.exe -o CMakeFiles\cmTC_9275e.dir\testCCompiler.c.obj -c "C:\Program Files (x86)\TGUI\TGUI-Build\CMakeFiles\CMakeTmp\testCCompiler.c"
CMakeFiles\cmTC_9275e.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_9275e.dir/testCCompiler.c.obj' failed
mingw32-make.exe[1]: *** [CMakeFiles/cmTC_9275e.dir/testCCompiler.c.obj] Error 1
mingw32-make.exe[1]: Leaving directory 'C:/Program Files (x86)/TGUI/TGUI-Build/CMakeFiles/CMakeTmp'
Makefile:125: recipe for target 'cmTC_9275e/fast' failed
mingw32-make.exe: *** [cmTC_9275e/fast] Error 2
答案 0 :(得分:1)
问题已解决:我将C:\ MinGW \ Bin添加到环境路径并重新启动了我的计算机。无法重新启动将导致问题持续存在。