[Qt-interest] Making a Qt program into a dynamic library
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Wed Dec 16 09:51:53 CET 2009
Arnold Krille wrote on Tuesday, December 15, 2009 9:20 PM:
> ...
> 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.
Why would this speed up an application? I would expect that this would take even longer (compared to a single huge executable which is loaded at once into memory), since dynamic linkage also takes its time. Or do you mean "Code is only dynamically loaded/linked when actually needed?"
But anyway, this is a different discussion. The crucial difference - I think - with your scenario and the OP's scenario is that in your scenario the Qt libs are already loaded (by KDE), whereas the OP tries to load a "Qt application As-A-Shared-Library" (as to use some recent buzzwords here ;) from within a non-Qt application.
It seems that upon initialisation of Qt - once the shared library gets loaded - fails, for whatever reasons. Before the path of execution reaches a single line of the OP's own code (linking with CONFIG += Qt alone is apparently enough to even make a single printf("Hello World!"); fail)
Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list