Some pros and cons have been listed in our wiki: [WIKI]Building static applications[/WIKI].
Some pros and cons have been listed in our wiki: [WIKI]Building static applications[/WIKI].
J-P Nurmi
Having static libraries work with qmake seems to require quite a bit of black magic. I've tried getting it working with the prebuilddefs, the postbuild defs, and the createprl methods of having static libraries properly recognize library dependencies during compilation. The only method that I've found that works is tweaking the order in which static libraries are compiled in order to resolve any linking errors.
I have found that the documentation online is frustratingly sparse and that a lot of the links to documentation are dead. So when trying to decide whether or not to use static or dynamic linking, keep in mind that you will have to deal with a few headaches to get everything linking properly.
Something that I haven't successfully gotten to work with static linking is the addition of the -( and -) flags that you can add straight to the ld linker. It seems like these flags are not recognized by the LDFLAGS you can place in a .pro file. Also, those flags really add to your compilation time, however when using them you don't have to deal with re-ordering of libraries.
Bookmarks