closed source library includes boost distribution

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

  • I can encapsulate my use of Activ so that the entire Activ part amounts to a single class I wrote that does not expose any of Activ's headers
  • This single header file does not use any boost anything
  • In this way I can ensure that the Activ parts of my code use Activ's Boost HPP files, and my code uses my Boost's HPP files

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?


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?


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.

Need Your Help

Mysql Sub Select Query Optimization

php sql mysql optimization subquery

I'm running a query daily to compile stats - but it seems really inefficient. This is the Query:

Finding Date of Birth given age in months

c# date-arithmetic

I'm really stuck with calculating date of birth given a persons age in months. Currently, I'm using C# to do that. However, failed to understand the logic. Thanks in advance

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.