- This topic has 4 replies, 3 voices, and was last updated 4 years, 8 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Programming with SOFA › Linking issues with plugin when loading it
Tagged: 64_bits, Linux_ubuntu, SOFA_other, v19.12 plugin linking
I am trying to implement a plugin with some new mappings. For now, I am just trying a test case, implement something equivalent to the IdentityMultiMapping.
My code compiles fine, but when I try to load the plugin in a scene, I get a linking issue:
[ERROR] [PluginManager] Plugin loading failed (/home/jjcasmar/projects/CPFSofaPlugin/build/Debug/lib/libCPFSofaPlugin.so): /home/jjcasmar/projects/CPFSofaPlugin/build/Debug/lib/libCPFSofaPlugin.so: undefined symbol: _ZN4sofa4core12MultiMappingINS_11defaulttype14StdVectorTypesINS2_3VecILi3EfEES5_fEES6_E5applyEPKNS0_16MechanicalParamsENS0_11TMultiVecIdILNS0_7VecTypeE1ELNS0_9VecAccessE1EEENSB_ILSC_1ELSD_0EEE
The code can be find here:
https://gitlab.com/jjcasmar/cpfsofaplugin/-/tree/master
Hey @jjcasmar good to see you again!
Indeed, linking issue.
It appears you have a linking issue related to the function ::apply().
To know where it comes from, please run:
ldd YOUR_PLUGIN.so
Could you also share with us the dependencies of your plugin? More especially what did you wrote in your CMakeLists.txt in the target_link_libraries( ... )
command?
Cheers
Hugo
Hi @jjcasmar
Make sure you are including the following header:
#include <sofa/core/MultiMapping.inl>
(note the ‘.inl’ file extension here)
Oupsi, Jean Nicolas is right.
It was no linking error but a unknown symbol, so an include missing!
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.