Is there something special about the MinGW compilers installed through Qt?

  • Moderators

    I made an experience I cannot believe that it stand a chance to work at all.

    I have just dowloaded and installed from

    The installation has been performed plain without any other changes.

    c:\MinGW64\mingw-w64\i686-7.2.0-posix-dwarf-rt_v5-rev1\mingw32\bin>g++ --version
    g++ (i686-posix-dwarf-rev1, Built by MinGW-W64 project) 7.2.0

    I have prepared aforementioned compiler installation because I need to do some tests with boost asio on customer request. After spending 2 days with 3 different versions of boost libs combined with my 2 different MinGW 4.9 and 5.3 and ending up with linking errors showing duplicated data areas with different sizes I was about to give up for this year. I have made sure every time that I had aligned and used always the very same compiler for boost and later on in the application compiled in creator. Always I got these stupid linking errors.

    Now I have used MinGW 7.2.0 for compilation of boost libs. This is done outside of qt creator. I have recompiled my test application in Qt creator with MinGW 5.3 and linked with the boost libs compiled with MinGW 7.2.0.

    No linker issues anymore. I cannot believe the test application works even flawless.

    Is anybody able to shed some light onto this?

  • Yes, MinGw 5.3.0 from Qt installer is 32 bit so is not MinGW64

  • Moderators

    Thanks for your reply.
    @6thC said in Is there something special about the MinGW compilers installed through Qt?:

    Yes, MinGw 5.3.0 from Qt installer is 32 bit so is not MinGW64

    Yes, that is exactly also my understanding.

    My problem is that when I compile boost libraries using the gcc switch and having the path pointing to the presumably 32 bit version MinGW5.3 boost compiles and the installation finishes without error. Using those boost libs in an application compiled by Qt creator with non-Qt application .pro file and the very same compiler MinGW5.3 I receive a linking error about duplication data areas with different sizes.

    Now the compilation of boost with MinGW 7.2 and their use together with the same project compiled using MinGW 5.3 does work.

    That is a bit puzzling isn't it?

  • Oh yes, that does sound puzzling.

    I don't use boost but I've seen some stuff in my travels online and I remember namespaces between qt and boost being an issue:
    It's an oldie and not sure if still relevant / at all relevant.

    I don't suppose you have some of the output messages. I probably can't help too much but the others here might be able to figure it out. At least you have a way to compile so far, I'd be interested to know the outcome.

  • Moderators

    MinGW and boost may not be considered as best friends. That is for sure.

    MinGW 5.3 delivered by Qt seem to have a library, which is linked to boost, causing these issues. Probably more a "fault" of MinGW. However, I do not plan to dig deeper.

    The plain installation of MinGW through mingw-w64-install.exe, as downloaded from webpage mentioned above, seem to be the pure mingw32 as it is hinting at the end of its installation path. This becomes apparent when following links to Boost/ where the compilation of boost is addressed.

    Therefore, the 7.2.0 MinGW compiler I have installed is also 32 bit. After generating a qmake with this compiler I can easily a homogenous tool chain and it is working with the boost libs.

    For MinGW it would be appreciated to make more obvious what is used. However, that is a different story.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.