I am attempting to port a program from OS X to Linux. It's C++ & Qt Creator and I did the original Windows to OS X port, so I tried to make it as POSIX-compliant as possible; the OS X port works well, and the Linux port builds and starts (it's on Ubuntu 9.10) but has some issues running.
The application has a plugin system. Plugins are built along with the main executable, and then are loaded at startup via dlopen. One of these plugins links to
VTK and the only thing setting this apart from the various other 3rd-party dependencies is that VTK here is statically linked. When I attempt to dlopen this plugin, or any plugin which depends on that plugin, dlopen throws an error like this:
Quote:
./Plugins/libVirtualCameraImaged.so.1: undefined symbol: _ZN29vtkInformationStringVectorKeyC1EPKcS1_i
The part that perplexes me is that the plugin code itself can compile and link without this error; if I had forgotten a library at compile time, it would never have linked. It's not dynamically linked with VTK, so LD_LIBRARY_PATH is irrelevant and I can't use 'ldd' to see where it's trying to find it. Looking at the build output, I see the "-L/usr/local/lib/vtk-5.6" and "-lvtkCommon" telling me that it has the right path to the right library, and I can look in the output of 'nm libvtkCommon.a' and see the aforementioned symbol:
Quote:
000000d6 T _ZN29vtkInformationStringVectorKeyC1EPKcS1_i
...so I know it is linking with a library that defines that undefined symbol.
Does anyone have any idea what I could be doing wrong in this build to get symptoms like this?