[Qt-interest] Loading Qt Shared from DLL

Finley Lee finleyl at alienskin.com
Tue Aug 25 23:18:27 CEST 2009


Thanks for the response.  To clarify, these are Photoshop plug-ins, not Qt plug-ins.  The higher level API you mentioned is for extending Qt applications.  QCoreApplication::addLibraryPath would be handy if I were in control of the host application, but unfortunately I am not.

I'm linking my Photoshop plug-in to Qt's import libraries, and expecting for Qt to get loaded by the OS runtime when my DLL is loaded.  Unfortunately, the DLL search order wants to only load DLLs from the places I mentioned.  I'm hoping there's some technique I don't know about which will allow the Qt DLLs to be loaded from the same location as my plug-in DLL.  


> -----Original Message-----
> From: qt-interest-bounces at trolltech.com [mailto:qt-interest-
> bounces at trolltech.com] On Behalf Of Christian Ehrlicher
> Sent: Tuesday, August 25, 2009 5:01 PM
> To: qt-interest at trolltech.com
> Subject: Re: [Qt-interest] Loading Qt Shared from DLL
> 
> Finley Lee schrieb:
> > I’m creating a Photoshop plug-in on the Windows platform which I’d
> like
> > to use Qt with.  The plug-in is a DLL which is installed in a
> different
> > folder from the application that loads it.  I would like to use the
> > shared library version of Qt, but I can’t figure out how to get my
> > plug-in to load the Qt DLLs when they are installed in the same
> folder
> > as my plug-in.
> >
> >
> >
> > I could put the Qt DLLs in Photoshop’s application folder, in the
> system
> > directory, or the Windows directory, but this seems like an
> invitation
> > for them to be overwritten by an installer for another product.
> >
> >
> >
> > Is there a way to have the Qt DLLs get loaded from my plug-ins
> folder,
> > or will I need to use the static version of Qt?
> >
> >
> Looks like you're looking for
> http://doc.trolltech.com/4.5/qcoreapplication.html#addLibraryPath
> 
> You should also carefully read
> http://doc.trolltech.com/4.5/plugins-howto.html#the-higher-level-api-
> writing-qt-extensions
> to make sure your plugins are in the correct subdirectory.
> 
> 
> Christian
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list