Multiple Versions of Boost in the Same Executable
I have a large executable that loads shared libraries as plugins. Some of those shared libraries dynamically link with an old boost version that's part of the system (/usr/lib) when they are loaded. I want to build my own plugin shared library, but I want to use a newer boost version. I tend to link boost in statically. My question is, will it cause any issues if I create a shared library that is statically linked with a newer version of boost, and have it loaded by the same executable that is dynamically linked with an old version of boost? I hoping this'll work, as I can't upgrade the system boost very easily. --- Aaron Wright
On 08/10/2012 4:52 PM, Aaron_Wright@selinc.com wrote:
I have a large executable that loads shared libraries as plugins. Some of those shared libraries dynamically link with an old boost version that's part of the system (/usr/lib) when they are loaded.
I want to build my own plugin shared library, but I want to use a newer boost version. I tend to link boost in statically.
My question is, will it cause any issues if I create a shared library that is statically linked with a newer version of boost, and have it loaded by the same executable that is dynamically linked with an old version of boost?
I hoping this'll work, as I can't upgrade the system boost very easily. --- Aaron Wright
It probably won't work as you're doing it. The only way I ever got this to half-work ever was to replace "boost" with "boost_version_number" in my boost source. It only half-worked but it was the right half. Sohail
My question is, will it cause any issues if I create a shared library that is statically linked with a newer version of boost, and have it loaded by the same executable that is dynamically linked with an old version of boost?
It probably won't work as you're doing it.
Why not? If boost types are not a part of plugin interfaces, it should work.
On 09/10/2012 7:39 AM, Igor R wrote:
My question is, will it cause any issues if I create a shared library that
is statically linked with a newer version of boost, and have it loaded by the same executable that is dynamically linked with an old version of boost?
It probably won't work as you're doing it. Why not? If boost types are not a part of plugin interfaces, it should work.
Actually, you are right. I was remembering incorrectly and my situation was that I had a static library, not a shared object, that needed to be linked into an app with a different version of boost.
participants (3)
-
Aaron_Wright@selinc.com
-
Igor R
-
Sohail Somani