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)

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章