How to Compile boost with GCC 5 using old ABI?

岁酱吖の 提交于 2019-11-30 07:37:06

To my knowledge, there are no prebuilt Boost packages for the old ABI in the official Kubuntu repositories, so you will have to build Boost yourself. The building process is documented here.

Make sure you're building the same Boost version that was used when your library was built. If there were any Boost configuration macros defined, you will also have to define them the similar way. Otherwise you may encounter ABI incompatibilities between the library and Boost you've built.

In order to switch libstdc++ to the old ABI you will also have to define _GLIBCXX_USE_CXX11_ABI to 0, as described here. For example:

b2 -j8 variant=release define=_GLIBCXX_USE_CXX11_ABI=0 stage

You will also need to define the macro when you build your own code that uses Boost and the library.

The define property, along with many others, is documented here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!