Plugin linking problem

Alexander Neundorf neundorf at kde.org
Tue Aug 7 03:00:04 BST 2007


On Monday 06 August 2007 16:59, Rafael Fernández López wrote:
> Hi all,
>
> I am facing a problem I am not sure I can solve in a trivial way. We have:
>
> - A plugin
> - A KCModule
>
> The problem I want to solve is:
>
> - The plugin has static public methods and properties.
> - The KCModule is the configuration dialog FOR THAT PLUGIN, and has to
> access in some way to those static methods for setting/getting those
> properties, apart from writing them to a config file.
>
> So, what would be the optimal is having two different libraries, and
> the kcmodule is loaded when going to be configured (KPluginSelector
> loads it automagically), but obviously this one needs to be linked to
> the plugin for accessing those methods.
>
> With cmake I haven't found an easy way of linking the kcmodule against
> the plugin itself.


Could you please explain a bit more ?

You could put the code you need in both in a source file which is compiled for 
both.
You could create a static library from this source file which both plugin and 
kcm module link to (the symbol will be used so this should work AFAIK).

Alex




More information about the kde-core-devel mailing list