Reputation: 45
I am working on a plugin for some application, and I am using libtiff. The filter is working just fine, but there is a problem. There are some .dll files that have to be included in compile path. When I add those .dlls in \QtSDK\Desktop\Qt\4.8.1\mingw\bin the plugin is working fine, but when i delete one or more of those .dlls, plugin is not recognised by the application. Those .dll are not included in the Qt SDK by default.
Is there any way I can include those .dll in my plugin and add a path to them without copying them to the Qt SDK bin folder.
Upvotes: 1
Views: 109
Reputation: 9789
Usually I add my plugins to my application directory and add this line of code to main()
in main.cpp like so:
qApp->addLibraryPath(QString("."));
Image plugins go in imageformats
and SQL drivers (ODBC) go in sqldrivers
. You can make the library path anything you want relative to your application root directory. I like to keep things simple and just reference the root directory.
Upvotes: 1