[Qt-interest] how to set dll path
Robert Wood
robert.wood at apostrophe.co.uk
Tue Sep 20 15:04:39 CEST 2011
Hopefully I understand your question correctly.
In the .pro file set where the headers are with this line:
INCLUDEPATH += C:\VXIpnp\WINNT\include
And the dll with this:
LIBS += C:\VXIpnp\WINNT\lib\msc\Visa32.lib
Obviously, replace with the path of where your headers and DLLs actually
are!
It's Qt, not QT, btw. :~)
On 20/09/11 12:00, Vincent Cai wrote:
> Dear all,
>
> I am newbie with QT. :)
> Current, I am trying to create an application with external dll.
> I can create dll successfully.
> And if I copy the dll to the application directory, the application can load dll and run correctly.
>
> But, I don't wanna to copy dll manually, instead, I hope I can set the dll path in the application code and hope the application can go to the dll path and load it.
> My dll located at: "E:/wcai_perforce/LTS_R3/CFT members/WCAI/Projects/TSA/Qt/TSA-build-desktop/Gen4/Gen4TSA/debug/mydll.dll"
> And I tried below code but fail:
> QCoreApplication::addLibraryPath("E:/wcai_perforce/LTS_R3/CFT members/WCAI/Projects/TSA/Qt/TSA-build-desktop/Gen4/Gen4TSA/debug/");
>
> Could anybody help?
>
> Thanks in advance,
> Vincent.
More information about the Qt-interest-old
mailing list