[Qt-interest] how to set dll path
David Ching
dc at dcsoft.com
Fri Sep 23 22:40:55 CEST 2011
AFAIK, addLibraryPath() only affects Qt handling of plugins. Your DLL is
not a Qt plugin, is it? AFAIK, Qt has no cross platform API to load a
library for your own (non Qt plugin) use. You need to just call the Windows
API LoadLibrary(), then it will work. But then you need to do
GetProcAddress() etc. to get the exported functions to call. Is that what
you had in mind?
-- David
"Vincent Cai" <wcai at cypress.com> wrote in message
news:<96BC0A076F88354396926F68D6BA00C521D4C5B956 at VMBX133.ihostexchange.net>.
..
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/");
More information about the Qt-interest-old
mailing list