Dynamic library with an add-on

Paul Chitescu Paul.Chitescu at IMC-Group.org
Wed Jun 11 16:53:57 CEST 2003


"Amadeo Casas Cuadrado" <acc at tid.es> wrote:
> Hello,
>
> I've made an extension to Konqueror creating a new add-on. It works. But
> now I want to create a dynamic library (.so) with this extension and I
> don't know how to do it. I don't want to increase the size of the
> executable konqueror file and I only want to use this dynamic library.
> I've made a dynamic library (.so) with the .cpp file of the extension
> and I've modified the main.cc file, but it doesn't works...
>
> Anyone could tell me what are the steps that I have to follow?
>
> Thanks in advance.

Having add-ons in dynamic libraries is currently not supported but i'm
working on it - shouldn't be difficult to implement. The only question is
about the method of registering those add-ons: we may use a section in the
configuration file or we may list all .so files in some directory - i
suggest $KDEDIR/share/apps/konq-embed/addons/ - or we may allow both
methods.

Currently -export-dynamic is enabled in konq-embed/src/Makefile.am -
removing it (like I do) reduces the executable size by about 650kb (i386).
That option should be conditionally added anyway since it's required only
when KJS is loaded dynamically or when dynamic add-ons - like yours - are
used.

That only works so easy on Linux and other ELF systems. On Windows symbols
can be exported only from libraries - not executables - so Konq/E must be
broken into one or more libraries and a (small) main program.

--
 Paul Chitescu
 pchitescu at null.ro   http://pchitescu.null.ro/   ICQ:22641673
 Any spammers will be painfully squeezed into /dev/null




More information about the konq-e mailing list