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?

4

1 回答 1

0

如果图像共享库中的 boost 符号被导出,当您在链接步骤中省略 boost 库时,它可能会起作用。

但最有可能 1. 符号未导出 2. 图像库仅包含 boost 的一部分,这是他们的任务所需要的。

如果可能的话,使用 boost 的动态版本重新编译图像库是最简单的。

于 2012-11-20T08:50:56.200 回答