The C compiler is not able to compile a simple test program.

在 CMakeLists.txt中project之前加入


set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
 

参考:

gcc - CMake: The C Compiler is not able to compile a simple test program - Stack Overflow

你可能感兴趣的:(开发语言)