← Back to team overview

yade-dev team mailing list archive

Re: How to use a plugin

 

> 35    FATAL yade.Omega /home/chiab/yadeNew/Branch6/core/Omega.cpp:226 loadPlugins: /home/chiab/yadeNew/YADEb6/lib/yade-b6/extra/libCWBoonPlugin3.so: undefined symbol `typeinfo for InteractionGeometryFunctor'
> 36    FATAL yade.Omega /home/chiab/yadeNew/Branch6/core/Omega.cpp:226 loadPlugins: /home/chiab/yadeNew/YADEb6/lib/yade-b6/extra/libCWBoonPlugin3.so: /home/chiab/yadeNew/YADEb6/lib/yade-b6/extra/libCWBoonPlugin3.so: undefined symbol: _ZTI26InteractionGeometryFunctor
> 36    FATAL yade.Omega /home/chiab/yadeNew/Branch6/core/Omega.cpp:226 loadPlugins: Bailing out.
> 
> Do you know what's happening?

You need to link with all plugins from which symbols you use. There is a
function called linkPlugins, so you will have to say something like:

env.SharedLibrary(....,LIBS=env['LIBS']+['nacg_nac']+linkPlugins(['InteractionGeometryFunctor','OtherClassYouUse']));

have a look in py/SConscript for inspiration; you need to put _file_
names where those classes are defined rather than _class_ names
themselves. linkPlugins will make sure that depending on build type
(per-class vs. monolithic), it will add the right LIBS.

Classes from core/ and lib/ are loaded automatically, no need to add
those by hand.

You're just 1 step from your plugin working (and there you start real
debugging ;-) )

HTH, Vaclav





Follow ups

References