【发布时间】:2016-08-08 16:57:07
【问题描述】:
我一直在寻找解决方案,老实说,我被困住了。
我正在尝试安装 Box2D,您可以通过文件路径看到。
不管怎样,这个提示在下面出现了好几次:
The CXX compiler identification is unknown
Check for working CXX compiler: C:/MinGW/bin/g++.exe
Check for working CXX compiler: C:/MinGW/bin/g++.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.6/Modules/CMakeTestCXXCompiler.cmake:54 (message):
The C++ compiler "C:/MinGW/bin/g++.exe" is not able to compile a simple
test program.
It fails with the following output:
Change Dir: C:/Users/alexm/Documents/Box2D/Build/CMakeFiles/CMakeTmp
Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_31089/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_31089.dir\build.make
CMakeFiles/cmTC_31089.dir/build
mingw32-make.exe[1]: Entering directory
'C:/Users/alexm/Documents/Box2D/Build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_31089.dir/testCXXCompiler.cxx.obj
C:\MinGW\bin\g++.exe -o CMakeFiles\cmTC_31089.dir\testCXXCompiler.cxx.obj
-c
C:\Users\alexm\Documents\Box2D\Build\CMakeFiles\CMakeTmp\testCXXCompiler.cxx
CMakeFiles\cmTC_31089.dir\build.make:64: recipe for target
'CMakeFiles/cmTC_31089.dir/testCXXCompiler.cxx.obj' failed
mingw32-make.exe[1]: ***
[CMakeFiles/cmTC_31089.dir/testCXXCompiler.cxx.obj] Error 1
mingw32-make.exe[1]: Leaving directory
'C:/Users/alexm/Documents/Box2D/Build/CMakeFiles/CMakeTmp'
Makefile:125: recipe for target 'cmTC_31089/fast' failed
mingw32-make.exe: *** [cmTC_31089/fast] Error 2
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 "C:/Users/alexm/Documents/Box2D/Build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/alexm/Documents/Box2D/Build/CMakeFiles/CMakeError.log".
所以,有错误。我正在尝试使用 MinGW 将它安装在 code::blocks 上,我目前安装了 2 个 MinGW 副本,一个位于 code::blocks 文件夹中,另一个位于我的根驱动器中,我分别安装了 MinGW解决这个问题。
这是我第一次使用 CMake,我正试图让它在我的 sfml 项目中使用 C++ 中的 code::blocks。
抱歉,如果我遗漏了什么,如果您发现任何您需要的信息,请随时发表评论!
【问题讨论】:
-
我会开始调查第一个错误。我的意思是您的计算机中缺少
libintl-8.dll?查看C:/MinGW/bin的路径 -
你被卡住了吗?您没有将 libintl 放入 google 并选择数百个点击中的任何一个?
-
在两个MinGW目录下(code::blocks安装目录和MinGW根目录下)
-
那么 C:\MinGW\bin 是你的 windows PATH 环境变量的一部分吗?
-
对迟到的回复表示歉意,这实际上是问题之一。由于某种原因,我的 PATH 有目录 C:\MinGW\。
标签: c++ mingw codeblocks