_GLIBCXX_USE_CXX11_ABI - how to use the old ABI on Qt 5.6 and Ubuntu 16.04 ?



  • Hi,
    I am using Qt 5.6 on Ubuntu 16.04, and I am finding that I cannot call functions in third-party libraries relying on C++11 implementations of std::string, I believe because of ABI changes in GCC 5.4. I would like to compile my application with the older ABI format by including the relevant GCC macro _GLIBCXX_USE_CXX11_ABI, but it appears that if I try, I still get the new ABI used...

    Can anyone help?


  • Qt Champions 2016

    @andrewhaighcell said in _GLIBCXX_USE_CXX11_ABI - how to use the old ABI on Qt 5.6 and Ubuntu 16.04 ?:

    I'm pretty sure you're out of luck. ABI between compiled template instantiations isn't guaranteed (that's why there's a fat warning in Qt's docs not to derive from the containers), and the ABI will depend on the compiler. Since the STL is surprise, surprise(!) a template library, the only way I see you'd get the old binary interface is if you use the old compiler.

    PS.
    Such problems (as well as binary sizes) will get more and more evident as the STL gets plumper and plumper.

    Kind regards.


Log in to reply
 

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