且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

CMake:C编译器无法编译简单的测试程序.令人惊讶的是,C编译器标识未知,但CXX是GNU 4.9.2

更新时间:2023-08-21 13:22:28

现在通过将我的GCC从4.9.2升级到4.9.3修复了.不再有崩溃的问题,但是显然与C ++ 11标准有关,并且我需要手动编辑CMakeLists.txt以在编译任何库和任何程序时将标志-std=c++11更改为-std=gnu++11

Fixed now by upgrading my GCC from 4.9.2 to 4.9.3. No more problems with crashing, however apparently there was a change related to C++11 standard and I need to manually edit CMakeLists.txt to change flag -std=c++11 to -std=gnu++11 when compiling any library and any program

MinGW/CxxTest奇怪的错误

切换/更新MinGW发行版解决了所有问题.我尝试将编译器更新为7.2 +/8.0 +版本,并摆脱了所有配置问题.可能是安装损坏或某些较旧版本的错误

Switching/updating MinGW distro solved all problems. I tried updating the compiler to 7.2+/8.0+ versions and got rid of all confiuration problems. Likely it was a corrupted installaton or some older version bug