[Qt-interest] Making a Qt program into a dynamic library

Arnold Krille arnold at arnoldarts.de
Tue Dec 15 21:19:52 CET 2009


On Tuesday 15 December 2009 16:21:49 Guido Seifert wrote:
> Hi, I have to need to convert a whole Qt program into a dynamic lib.
> I tried to replace the TEMPLATE = app with TEMPLATE = lib in my .pro file
>  and get a nice .so file. Unfortunately I get a segfault as soon as the
>  dynamic link loader tries to open the lib. Problably some global init
>  going wrong.
> Am I out of luck, or is there some trick I could try?

This is actually not as un-common as some think. KDE used this at least 
through its KDE3 to speed up application startup. A typical KDE app would be a 
special main-entry linked as lib and then either the "real" app or kdeinit 
could dlopen this and run it. And this worked, so it should be possible.
Maybe have a look at the sources of KDE3?

Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091215/42f76cb1/attachment.bin 


More information about the Qt-interest-old mailing list