I'm working on a library that is statically linking our boost dependencies so that we do not have to worry about conflicting with users.
Our library statically links
- date_time
- system
- thread
- regex
- filesystem
- program options
We then have an executable that also needs program_options and links against it dynamically.
When we run the excutable we are getting a double free.
We could take the solution of not linking our code against program_options, which realistically we do not need to, but I want to know WHY this is happening and HOW to prevent it going forward.
Is the answer "don't link your library against boost statically"? If so then what kind of strategies exist to ensure that my boost and your boost play nice together? If the answer is "there are a few boost libraries which shouldn't be static" then is there a list?