I'm using a closed source library (by Activ financial) that includes with their API a boost distribution, both some boost header files and boost library files.
I also use Boost in my existing codebase, and I need to use Activ from my existing code.
Some points
My worry comes in linking. How can I ensure that my Activ dependent code links to Activ's Boost, and my other code links to my Boost?
I'm using g++ now, will also be doing this in VS2008. I got it working in VS2008 before, but I have no idea how everything linked. I want to try to make sure it's done correctly.
Is there a way to do it without further encapsulating the Activ part in a dynamic library?
Edit:
For one, my final product is always an executable file. For two, I statically link to boost myself. The Activ library includes both static and dynamic versions of Boost object libraries, and I plan to statically link it.
I never pass Boost objects between code that uses different boost versions.
The question is, how do I link one cpp or .o
file to objects in one library file, and then make sure other .o
files link to the identical objects in another library file? Is this possible?
Boost is licensed under its own free, open-source license, known as the Boost Software License.
Does the library dynamically or statically link to Boost? If statically linked, does the library expose the symbols in the DLL (declspec export)?
If the library is statically linked and the symbols are not exposed, and you do not pass any Boost data structures (smart_ptr, threads, etc) back and forth, you are likely safe to use your own version of the Boost library in your DLL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With