Updating toolchain MinGw from gcc 4.7 to gcc 5.3 causes linking problems

I am using Clion version 2017.1 (updated recently) with Cmake 3.7 on windows7 with MinGw and compiler gcc 5.3.

Recently I updated the compiler from 4.7 to 5.3, and I changed it in the settings > toolchain windows in Clion. Cmake finds all compilers and everything is fine. However, when I build the program with this new toolchain, it complains of "undefined reference" error which is related to linking libraries. I didn't need to change my CMakeLists file because everything is the same. The interesting part is when I change the toolchain to the old version, the program builds without any problem. 

Could anyone tells me what I am doing wrong? I attached two images with two different toolchains. One is successful another one is not.

Thanks for your help.

MinGw and gcc 4.7. program built is complete and successful.

 

MinGw and gcc 5.3

The program complains of undefined reference (linking libraries)



1 comment
Comment actions Permalink

I think they changed ABI between 4 and 5. Try using this setting: _GLIBCXX_USE_CXX11_ABI

0

Please sign in to leave a comment.