[Qt-interest] Plugins in static builds
Malyushytsky, Alex
alex at wai.com
Mon Jul 27 21:31:17 CEST 2009
>> Why can't I use plugins in the static build of my application?
Who said you can't?
As for me, the question is too abstract to get a useful answer. "Why my code does not work" is tough question to answer when you have no idea what is wrong and even what were you trying to do.
For example QT would not even be built static in the general meaning of this world under the Windows at least with MSVC. It will still be using dynamic CRT libraries by default. (Options can be changed manually, but you will have runtime problems, which commercial QT support rejected to deal with and just claimed it was unsupported).
So I would say that at this point there is no reason to build statically your application.
There are reasons not to:
1. If you would manage to use "Static" built QT, you still would have to link against dynamic CRTs.
2. If you have other dependencies, which you can rebuild, you still would have to link them against dynamic CRTs too.
3. If you have 3rd party dependencies you would probably have to link against dlls. On Windows it is a common practice to provide static libraries linked against static CRTs and dynamic libraries linked against dynamic CRTs.
So you probably will not have 3rd party static library linked against dynamic CRT, which means you can't link against 3rd party static library, if you are using QT.
If you are on the different platform or using different compiler, it might be not an issue.
Other than that, QT allows you to build it "statically" and still allows you to load most of plugins (it has a list of supported plugins).
You will need to modify the source code in your application and your custom plugins, if you have any: add Q_IMPORT_PLUGIN macro.
What exactly you are trying to do? What fails?
Regards,
Alex
-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Vyacheslav V. Yurkov
Sent: Monday, July 27, 2009 7:42 AM
To: qt-interest at trolltech.com
Subject: [Qt-interest] Plugins in static builds
Why can't I use plugins in the static build of my application?
--
Vyacheslav V. Yurkov <uvv.mail at gmail.com> Team Leader
Norilsk Tel: +79069001870
Software Development Department
Joint Stock Company "Channel-7", ISP
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
"Please consider our environment before printing this email."
More information about the Qt-interest-old
mailing list