PDA

View Full Version : dll deployment



freiza
28th February 2015, 22:04
I've created a dll using qt and used Qwidgets.
Now I want to deploy my dll. I used windeployqt and copied all the dlls and other stuff to client machine along with my dll. But still it says qtcore5.dll is missing from the computer.

I don't want to touch system directory of my client. What should I do?

ChrisW67
1st March 2015, 03:00
Deploy the missing Qt DLL (and all its dependencies) in the same place as yours.

freiza
1st March 2015, 12:19
already put the dependencies in the same folder but still not working :(

wysota
1st March 2015, 13:30
Use Dependency Walker to check missing dependencies.

freiza
1st March 2015, 15:52
It says qt5core.dll is missing from the system. But windeployqt has put qt5core.dll in the same folder.
But still not working. Checked with dependency walker and it works on my computer. But on my client machine it fails.

wysota
1st March 2015, 16:30
"In the same folder" as what?

freiza
1st March 2015, 18:55
I used windeployqt and it generated all the dependencies in the same folder where my executable resides. And I just copied the entire folder and pasted it in my client machine and it didn't work.

And also, can you give me link to statically compiled qt5+qtcreator for x86 and x64 mingw?

I don't have good hardware to build it myself.

I could only find qt5 for msvc and not mingw.

ChrisW67
1st March 2015, 19:53
Checked with dependency walker and it works on my computer. But on my client machine it fails.

You really need to be specific. What failed? Dependency Walker failed to run? Dependency Walker failed to load one or more of the dependecies of your DLL? (that is DW working BTW). Your DLL fails to load when loaded by whatever program is linked to it?

Exactly what files have you deployed? List them, don't just say "windeployqt ..." or "all of them." Exactly which folder do they come from on your build machine?

freiza
2nd March 2015, 00:18
"My Application DLL" resides with the below mentioned dll in my "c:\somepath\Release folder"

icudt53.dll //"c:\somepath\Release folder"
icuin53.dll //"c:\somepath\Release folder"
icuuc53.dll //"c:\somepath\Release folder"
libgcc_s_dw2-1.dll //"c:\somepath\Release folder"
libstdc++-6.dll //"c:\somepath\Release folder"
libwinpthread-1.dll //"c:\somepath\Release folder"
qt5core.dll //"c:\somepath\Release folder"
qt5gui.dll //"c:\somepath\Release folder"
qt5svg.dll //"c:\somepath\Release folder"
qt5widgets.dll //"c:\somepath\Release folder"
/iconengines/qsvicon.dll //"c:\somepath\Release folder\iconengines"

Inside "c:\somepath\Release folder\imageformats" these dll are present:
qdds.dll
qgif.dll
gicns.dll
qico.dll
qjp2.dll
qjpeg.dll
qmng.dll
qsvg.dll
qtga.dll
qtiff.dll
qwbmp.dll
qwebp.dll


Inside "c:\somepath\Release folder\platforms
there is only one dll namely "qwindows.dll"

So I copied release folder from "c:\somepath\" that contains all the generated dll with correct folder hierarchy with my application dll and put it in my client machine. And when I try to execute my dll it says qt5core.dll is missing from the computer.

These files weren't generated with windeployqt:

libgcc_s_dw2-1.dll //"c:\somepath\Release folder"
libstdc++-6.dll //"c:\somepath\Release folder"
libwinpthread-1.dll //"c:\somepath\Release folder"

So I checked with dependency walker. And it suggested me these dll. Hence I put these dll into the release folder. And my program worked fine and dependency walker showed no errors.

But when I shifted my release folder to client machine. Dependency walker says qt5core is missing though qt5core is present on the same folder with my application dll.

I linked it to a "TestApplication.EXE" also created with qt and this "TestApplication.EXE" is working fine and dependency walker is showing no errors for this application. even after shifting to my client machine. The "TestApplication.EXE" resides in the same folder where my application dll resides, I mean in "c:\somepath\Release folder"

whew. That was a lot of typing :)

wysota
2nd March 2015, 06:39
Where did you copy these all files from?

freiza
2nd March 2015, 16:29
When someone types windeployqt executable.[dll/exe]. Then I think these dll are copied from mingw\bin folders into my application directory. (I even copied all these dll files from mingw\bin folder manually but same problem).

I don't understand that my exe is working fine with those dll's but why my generated dll is not working with the copied dll. Maybe there is some problem with my qt installation.

Btw, I solved the problem. I used code::block to create dll and now it doesn't require any qt's dll. So my application is working fine.

You may close this thread if you like.

ChrisW67
2nd March 2015, 20:11
So you never had a Qt DLL or program.

If you ever do write and deploy a Qt program then ...
On a quick inspection it seems that you are missing the platform plugin and possibly the ANGLE libraries.
http://doc.qt.io/qt-5/windows-deployment.html#creating-the-application-package