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)

 

posted @ 2020-04-13 14:51  insistYuan  阅读(14462)  评论(0编辑  收藏  举报