0

I am currently writing an application in C++ using an API to grab images from a camera. This API is a shared object and was build using the static boost thread lib (v1.40).

In my application I also want to use the boost threads, but when I link boost thread (v1.51) dynamically into my application, the API calls the boost thread function from the dynamically linked version and I get a segmentation fault.

Is there a way, maybe a linker option, where I can fix this problem so that the API will use the included static linked version anyway or is the only way to solve this using the same versions?

Owen
  • 43
  • 1
  • 3

1 Answers1

0

If the boost symbols in the image shared lib are exported, it might work when you just leave out the boost library in your link step.

But most likely 1. the symbols aren't exported and 2. the image lib includes just the part of boost, which is needed for their task.

It would be easiest, if possible, to recompile the image lib using the dynamic version of boost.

Olaf Dietsche
  • 72,253
  • 8
  • 102
  • 198
  • Thanks for the reply. Unfortunately, the sources are not shipped with this API, so I only have the shared object and the headers. Therefore, I cannot recompile the API using the dynamic boost library. And the symbols are not exported. – Owen Nov 20 '12 at 08:56