[Qt-interest] dll problem

Andreas Pakulat apaku at gmx.de
Sun Dec 14 10:37:22 CET 2008


On 13.12.08 19:29:02, Evan Teran wrote:
> I've done some basic tests and it all seems to work perfectly. The
> plugins properly resolve the symbols which are provided by the plugin.

That doesn't make it a good design.
 
> The main reason I am prefering this is that there are several "utility"
> classes which most plugins use. So in the beginning I placed these in my
> main apps sources and the plugins just used them. Now with the new
> system because these classes need function definitions, I have to have a
> "core library" which all plugins link to. I can either make it static
> which makes the install just as simple as before but bloats the binary.
> Or I have have it shared and have an even more complicated dependancy
> tree with an extra library that has to be installed. If having the main
> .exe provide these classes is workable, it is simpler.

Thats a non-issue, because you ship .exe+.dll in the same directory on
windows and use RPATH on *nix to make sure the right library is used.

> Also, if the main app can export symbols, then that means I only have to
> update 1 place to change my API, not several (as I do now with my new
> plugin system).

Thats simply wrong. If you change the existing API (rename
classes/methods/functions or move stuff around) then you have to update
_all_ places that are using the changed API. It doesn't make any difference
wether the shared code is compiled into the .exe or into a shared library. 

Andreas

-- 
Everything that you know is wrong, but you can be straightened out.



More information about the Qt-interest-old mailing list