CMake,c编译器无法编译简单的测试程序

问题描述 投票:1回答:1

我正在尝试使用cingke和mingw编译我的项目,但是收到错误:

     cmake -G "MinGW Makefiles" ../
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: D:/mingw/bin/gcc.exe
-- Check for working C compiler: D:/mingw/bin/gcc.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.9/Modules/CMakeTestCCompiler.cmake:51 (message):
  The C compiler "D:/mingw/bin/gcc.exe" is not able to compile a simple test
  program.

问题出在哪儿?

c++ mingw32
1个回答
0
投票

如果目录中的名称中有任何空格,则有时会出现问题,就像您在“程序文件”中一样。尝试将sdk复制到另一个没有空格的位置,看看会发生什么

© www.soinside.com 2019 - 2024. All rights reserved.