Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
_GLIBCXX_USE_CXX11_ABI - how to use the old ABI on Qt 5.6 and Ubuntu 16.04 ?
andrewhaighcell last edited by
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?
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.
Such problems (as well as binary sizes) will get more and more evident as the STL gets plumper and plumper.