[SOLVED] Using qwindowsd.dll platform from correct location
I'm working with Qt 5.3 and I run my application on my development machine (running the executable).
I checked Process Explorer and looks like the qwindowsd.dll is used from the C:\Qt5\5.3\ path, though in the folder I'm running the executable from has a platforms sub-folder containing the same file.
There is also a few dlls taken from the Qt folder's plugins\imageformats and plugins\accessible folders.
What can I do to make sure that all of these are used from the executable's folder?
Hi, Qt tries to load qwindowsd.dll in 5 different ways:
- Qt installation path (plugpath=) written into Qt5Cored.dll when you installed Qt.
- via a possible call QApplication::addLibraryPath(path); (before QApplication a(argc, argv); in main.cpp)
- if there is a qt.conf together with your .exe file, look for plugin=path in the file
- if there's a platforms subdirectory where your .exe file is
- if there's an environment variable QT_PLUGIN_PATH
However on you development machine, Qt almost always choose 1). To avoid it, for example you can "binary edit Qt5Cored.dll":http://www.tripleboot.org/?p=536#BinaryEditing
Temporarily rename C:\Qt5, so that Qt can't find it and is forced to load a different copy.
Thanks - hskoglund and JKSH - great info and tip.