Search code examples
c++qtdllpluginskeil

Deploying Qt dll file - cannot find windows plugin although platforms/qwindows.dll exists and so libEGL and libGLES


I built my app as normal exe and run windeployqt on it. I got long list of files in folder with exe.

files:
./
D3Dcompiler_47.dll
Qt5Core.dll
Qt5Gui.dll
Qt5Svg.dll
Qt5Widgets.dll
WLedPlugin.exe
accessible
files.txt
iconengines
icudt52.dll
icuin52.dll
icuuc52.dll
imageformats
libEGL.dll
libGLESv2.dll
platforms
qt_cs.qm
qt_de.qm
qt_fi.qm
qt_hu.qm
qt_it.qm
qt_ja.qm
qt_ru.qm
qt_sk.qm
qt_uk.qm

./accessible:
qtaccessiblewidgets.dll

./iconengines:
qsvgicon.dll

./imageformats:
qdds.dll
qgif.dll
qicns.dll
qico.dll
qjp2.dll
qjpeg.dll
qmng.dll
qsvg.dll
qtga.dll
qtiff.dll
qwbmp.dll
qwebp.dll

./platforms:
qwindows.dll

then I compiled app as dll and put it into folder with proper program. (I'm developing plugin for Keil IDE). DLL is seen well, but when part of code with QApplication launches, then it can't find windows plugin.

So as you see qwindows.dll is in proper folder as libEGL and libGLESv2 are too and it still cannot see windows plugin.

I'am using msvc compiler x86 and Qt 5.3 version.


Some workaround found -> I simply threw msvc off and used mingw instead. It simply wroked.


Solution

  • Ok i guess now i know a bit more what was the problem about.

    I had folder with Keil application and folder with my dll plugin. Windows check for called dll's dependencies in application's that called dll directory in first, not in dll directory. Dll directory is in lower position.

    Of course sooner or later windows should finally get to the dll's folder, but on some machines it didn't. Moving dependencies from DLL's directory to application's directory helped and is working well for the time being. Thanks all for help! :)