应用程序可以依赖于两个不同版本的libstdc ++的? [英] Can an application depend on two different versions of libstdc++?

查看:223
本文介绍了应用程序可以依赖于两个不同版本的libstdc ++的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

能的应用程序依赖于两个不同的版本libstdc ++同时? (例如:++的libstdc 5和libstdc ++ 6)?该方案存在 - 一些二进制依赖的libstdc ++ 6,但加载依赖的libstdc ++ 5 ...

一个的.so

请问有工作的机会吗?


解决方案

更​​重要的是,你需要检查库这两个版本是二进制兼容与否。 G ++ 3.3和3.4都没有,例如<​​/ P>

和即使它们是:
*可以有名称重整问题
*您不能做跨模块分配/释放(也是不好的想法)
*您可能无法解决与STL模块

Can an application depend on two different versions of libstdc++ at the same time? (e.g.: libstdc++5 and libstdc++6)? The scenario being - some binary depends on libstdc++ 6 but loads an .so that depends on libstdc++5...

Will that have any chance of working?

解决方案

Most importantly, you need to check if those two versions of the library are binary compatible or not. G++ 3.3 and 3.4 are not, for example.

And even if they are: * There can be name mangling issues * You cannot do cross module allocation/deallocation (a bad idea anyway) * You probably can't work around modules with STL

这篇关于应用程序可以依赖于两个不同版本的libstdc ++的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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