[Qt-interest] Problem with Windows distribution of plugins using CRT DLL

Malyushytsky, Alex alex at wai.com
Fri Aug 14 04:00:04 CEST 2009


Have not used plugins in QT4, but in QT I just had them at the same folder as application on Windows .
If understood it correctly you can use addLibraryPath to allow it, have not tried in QT4 though.
But you may try and see if it works :)

>From QT documentation:

"
void QCoreApplication::addLibraryPath ( const QString & path )   [static]

Prepends path to the end of the library path list. If path is empty or already in the path list, the path list is not changed.
The default path list consists of a single entry, the installation directory for plugins. The default installation directory for plugins is INSTALL/plugins, where INSTALL is the directory where Qt was installed.
"

Regards,
   Alex


-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of David Ching
Sent: Thursday, August 13, 2009 4:30 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] Problem with Windows distribution of plugins using CRT DLL

Hello,

Has Qt Software considered the ramifications of needing to place plugin
DLL's into e.g. the imageformats\ and accessible\ subfolders?  This creates
a deployment issue under Windows.  In a Windows "app local" deployment, the
CRT DLLs are put either into the .exe folder, or into a subfolder called
e.g. Microsoft.VC80.CRT.  This lets the .exe (and any DLL's in the same
folder as the .exe) use the CRT DLLs without having to install them globally
onto the user's computer.

But it doesn't work for the DLL's in the plugins folders such as
imageformats\ and accessible\ as these DLL's are in a different folder than
the .exe so they don't find the CRT DLL's and thus won't be loaded unless
the user's computer has those same DLL's stored globally (which the app
cannot guarantee).

The only workaround I've found is to also put the CRT DLL's into each plugin
folder, but that is a waste and may cause 2 instances of the DLLs - one from
the .exe folder, and another from the plugin folder.  Perhaps the plugin
DLL's could be moved into the .exe folder with a naming system, such as
imageformat_*, accessible_*.

What do you think about that?

Thanks,
David

_______________________________________________
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