【问题标题】:Can't build SFML 2.4.1 with CMake无法使用 CMake 构建 SFML 2.4.1
【发布时间】:2017-02-03 14:58:30
【问题描述】:

我正在尝试在 Windows 10 上使用 CMake GUI 为 MinGW 构建 SFML 2.4.1。我收到一条错误消息,提示“libintl-8.dll”丢失和一堆其他错误。

我检查了路径,“C:\MinGW\bin”和“C:\MinGW\msys\1.0\bin”都在那里。我在“C:\MinGW\msys\1.0\bin”中找到了一个名为“msys-intl-8.dll”的库,试图将其重命名为“libintl-8.dll”。 “丢失”错误消失了,但其余错误仍然存​​在。

CMake GUI 中的消息:

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_73327/fast"
    Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
    CMake Error at C:/CMake/share/cmake-3.7/Modules/CMakeTestCCompiler.cmake:51 (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:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp
      Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_73327/fast"

      Generator: execution of make failed.  Make command was:
      "C:/MinGW/bin/mingw32-make.exe" "cmTC_73327/fast

      CMake will not be able to correctly generate this project.
    Call Stack (most recent call first):
      CMakeLists.txt:40 (project)

“CMakeOutput.log”的内容:

The system is: Windows - 10.0.14393 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/MinGW/bin/gcc.exe 
Build flags: 
Id flags: 

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"

The C compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdC/a.exe"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/MinGW/bin/g++.exe 
Build flags: 
Id flags: 

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"

The CXX compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/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


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"

The C compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdC/a.exe"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/MinGW/bin/g++.exe 
Build flags: 
Id flags: 

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"

The CXX compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/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


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"

The C compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdC/a.exe"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/MinGW/bin/g++.exe 
Build flags: 
Id flags: 

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"

The CXX compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/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


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"

The C compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdC/a.exe"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/MinGW/bin/g++.exe 
Build flags: 
Id flags: 

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"

The CXX compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/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


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"

The C compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdC/a.exe"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/MinGW/bin/g++.exe 
Build flags: 
Id flags: 

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"

The CXX compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/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


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"

The C compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdC/a.exe"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/MinGW/bin/g++.exe 
Build flags: 
Id flags: 

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"

The CXX compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/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


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"

The C compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdC/a.exe"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/MinGW/bin/g++.exe 
Build flags: 
Id flags: 

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"

The CXX compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/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


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"

The C compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdC/a.exe"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: C:/MinGW/bin/g++.exe 
Build flags: 
Id flags: 

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.exe"

The CXX compiler identification is GNU, found in "C:/SFML/SFML-2.4.1-source/build/CMakeFiles/3.7.2/CompilerIdCXX/a.exe"

“CMakeError.log”的内容:

Determining if the C compiler works failed with the following output:
Change Dir: C:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp

Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_2426e/fast"

Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_2426e/fast"


Determining if the C compiler works failed with the following output:
Change Dir: C:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp

Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_acc1b/fast"

Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_acc1b/fast"


Determining if the C compiler works failed with the following output:
Change Dir: C:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp

Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_9db84/fast"

Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_9db84/fast"


Determining if the C compiler works failed with the following output:
Change Dir: C:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp

Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_4e89a/fast"

Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_4e89a/fast"


Determining if the C compiler works failed with the following output:
Change Dir: C:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp

Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_570e4/fast"

Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_570e4/fast"


Determining if the C compiler works failed with the following output:
Change Dir: C:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp

Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_ef272/fast"

Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_ef272/fast"


Determining if the C compiler works failed with the following output:
Change Dir: C:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp

Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_6bcbb/fast"

Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_6bcbb/fast"


Determining if the C compiler works failed with the following output:
Change Dir: C:/SFML/SFML-2.4.1-source/build/CMakeFiles/CMakeTmp

Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_73327/fast"

Generator: execution of make failed. Make command was: "C:/MinGW/bin/mingw32-make.exe" "cmTC_73327/fast"

【问题讨论】:

    标签: c++ windows gcc cmake mingw


    【解决方案1】:

    我设法解决了这个问题,我不得不在生成器选项中选择 Msys MinGW 而不仅仅是 MinGW :)

    【讨论】:

      猜你喜欢
      • 2021-10-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-18
      • 2019-10-30
      • 1970-01-01
      • 2020-06-19
      • 1970-01-01
      相关资源
      最近更新 更多