Boost logo

Boost Users :

From: Gavin Lambert (boost_at_[hidden])
Date: 2020-05-18 22:47:06


On 19/05/2020 07:26, Nicholas Yue wrote:
> I did try with the factory approach but I was only able to
> gain access to one of the plugin.
>
> I have build a single shared library called MultiplePlugins
> that contains two plugins SourcePlugin and SinkPlugin
> but I have not found a way to iterate the individual
> factory method
[...]
> BOOST_DLL_ALIAS(SinkPlugin::create, create_plugin)
[...]
> BOOST_DLL_ALIAS(SourcePlugin::create, create_plugin)

You can't have two symbols in the same library with the same name/alias;
that's either a linker error or one will shadow the other.

You'll have to use one of the other techniques to find symbols to load,
such as using a named section instead of a named alias.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net