如何编译使用旧ABI GCC 5助推? [英] How to Compile boost with GCC 5 using old ABI?

查看:399
本文介绍了如何编译使用旧ABI GCC 5助推?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了与海湾合作委员会的ABI更改之前的gcc编译4.8库。

I have downloaded a library that was compiled with a gcc 4.8 before the ABI change in GCC.

在我的笔记本电脑(最新Kubuntu的)我有GCC 5.2。当我安装了提升,似乎它使用新的ABI但后来我得到以下链接错误

On my laptop (latest kubuntu) I have GCC 5.2. And When I installed boost, it seems that it used the new ABI but then I get the following link errors

未定义的符号.....__ cxx11 ....

undefined symbol.....__cxx11....

我如何使用旧的ABI与GCC5安装升压?

How can I install boost using old ABI with GCC5 ?

推荐答案

据我所知,有旧ABI在官方Kubuntu的仓库没有prebuilt升压包,所以你必须建立自己的提升。建设过程中被记录这里

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.

请确保您建立当你的图书馆建被使用相同的加速版本。如果有任何升压配置宏定义,您还必须定义它们类似的方法。否则,你可能会遇到不兼容ABI的库之间和Boost你已经建立。

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.

为了切换的libstdc ++旧ABI还必须定义 _GLIBCXX_USE_CXX11_ABI 0时,所描述的此处。例如:

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

您还需要当你构建一个使用升压和图书馆自己的code定义的宏。

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

这篇关于如何编译使用旧ABI GCC 5助推?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆