I have an application that needs to use a certain closed source C++ API. This API is distributed with some bits of Boost, binary library files and all. I like to use Boost in my own code. I can't just use their version of Boost since they did not distribute all the parts of Boost I need. How should I proceed? The target platform is linux, eventually Windows as well.
- I won't pass Boost objects across the API boundary.
- I can compile things to object files so that my code uses my boost headers, and the API's code uses its Boost headers. This part seems straightforward.
- What I don't get: how to link my code to my Boost library files, and API's code to its Boost library files. Do I need to compile my own wrapper around the API -- a wrapper whose headers do not include Boost -- to a dynamic library?? (This is the only way I can think of to do the linking. The symbols in the API's Boost library files should be identical to the symbols in my Boost library files. I have to do the linking in two stages, no? The only way I can link one piece of the program without the rest is by making a dynamic library, no?)
BoostSystem_x86-64_redhat_gcc41_mdi
instead ofboost_system
. Somehow, my code actually builds. – Rutger