2 plugins in one shared library

Poul Bondo Andersen pba at gatehouse.hn.org
Fri Jan 24 12:11:02 UTC 2003


Hi there

I have been trying to make a couple of plugsins for the KDevelop 3 
environment.

1) A project part to handle some "special" custom projects (based on 
customproject).
2) A view part to show some "special" aspects of the project (based on the 
filetreewidget).

When I have these in two separate libraries (as is intended) everything is 
fine. I get to see my own widget 2) when I load a project of this spcial 
customproject type.

I have an additional requirement for some additional informationflow between 
the two parts. However there is an interesting "intentional feature" in GCC 
3.x which means that the dynamic_cast<TYPE> is not ensured to work on objects 
shared between two libraries.

As a work around this problem I was trying to put the 2 plug parts into the 
same shared library. However this does not work out of the box. I get the 
project part loaded, but the visual part is nowhere to be found.

I have simply all the source files into the same library and changed the 
second .desktop file in the following line.
X-KDE-Library=samelibforboth

I can accept that it will not load the second plugin automatically. However I 
have been unable to figure out how to do this manually.

The question now is:
How do I load an additional (view) plugin from the project part plugin ?

Thanks in advance

/Poul








More information about the KDevelop-devel mailing list