Hello everyone,
we’re in the process of developing our plugin and we need to use an in-house developed library. After our naive plugin build completes, the plugin loads, but the Paraview crashes, complaining about an undefinded symbol, which of course is a class from the in-house library. How can we solve this?
Hi Mathieu,
the exact error look like this:
… paraview-5.8.1-intelmpi/bin/paraview: symbol lookup error: … /libFRDReaders.so: undefined symbol: _ZN6mesh3d6FEGridC1Ev
(our lib is mesh3d). We ran ldd on the plugin (FRDReader.so) and the accompanying dynamic lib (libFRDReaders.so) and our external library doesn’t show on any of the lists.
We set the LD_LIBRARY_PATH to contain the path to the library and it it didn’t help.
Any help would be very much appreciated
Hello Mathieu, yes - this method is both declared & defined. The lib we’re using is probably not the issue, but our build process. What is the proper & formally correct way of linking external library? Please see the top level CMakeLists.txt file we’re using now. CMakeLists.txt (1.7 KB)
Hi again Mathieu, take a look at the attached file. It doesn’t work, cmake won’t start the build process because:
CMake Error at CMakeLists.txt:44 (target_link_directories): Cannot specify link directories for target “FRDReader” which is not built by this project.
CMake Error at CMakeLists.txt:46 (target_link_libraries): Cannot specify link libraries for target “FRDReader” which is not built by this project.
Hi, thank you very much for your responses.
We made a little progress with our issue, but now the problem is that within our library there are some unresolved symbols, related to VTK lib. Now, we write & run our plugin with Paraview 5.8.1, and our library is built with VTK 9.1. Could the VTK version be the source of the discrepancy? Is there a way of determining which version of VTK does my Paraview use? (We use paraview 5.8.1 built from source).
Thanks
If you library uses VTK, you will need to make it uses ParaView own internal VTK or build it inside the plugin directly to avoid name conflicts. Using the same version will not be enough.