The C compiler "/usr/bin/cc" is not able to compile a simple test program. 解决方法

在使用cmake编译工具的时候,莫名其妙的报了The C compiler "/usr/bin/cc" is not able to compile a simple test program.这个错误

解决方法:

加入下面两个选项

-DCMAKE_CXX_COMPILER=$(which g++) -DCMAKE_C_COMPILER=$(which gcc)
原文地址:https://www.cnblogs.com/coolYuan/p/12691369.html