Deploying a C++ Qt Application to another Computer
-
to get rid of the LIBGCC_S_SJLJ-1.dll you can add the following line to your pro-File:
QMAKE_LFLAGS += -static-libgccWhat are the other missing DLLs? I think your other computer is just missing some runtime libraries thats why your have to copy to many files.
-
The next files dependency walker shows me are:
- icuin49.dll
- icuuc49.dll
- libglesv2d.dll
- libwinpthread-1.dll
- gpsvc.dll
- ieshims.dll
Thanks for your help so far! :)
-
Have you tried using Qt 4.8 instead? Qt5 is only useful for writing QML apps for mobile devices, because nokia/digia have sacrificed alot for the cash they expect from that market. And what you're experiencing is just that. For example, by default even a normal desktop application now requires the OpenGL ES and WebGL libraries (ES stands for embedded systems) and DirectX HLSL compiler libraries. The hoops you have to jump through to use Qt5 are described "here":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html.
Try Qt4.8, include QtGui.dll and QtCore.dll, and you'll be much happier. -
DerManu, I really hope you are wrong, but I have this nasty suspicion that you aren't...and I've just upgraded all my working machines to Qt5.0.2...
-
OK, so after my previous post, I panicked and ran to my Windows Qt machine...and noticed that there is a massive difference between the sizes of the release .dll's and the debug .dll's. For example, Qt5Cored.dll is ~75MB whereas Qt5Core.dll is (only) ~4MB.
@MarcoG88 - Judging from your post:
[quote author="MarcoG88" date="1365946879"]
- QT5CORED.DLL
- QT5GUID.DLL
- QT5WIDGETSD.DLL
[/quote]
I take it you compiled in debug (hence the xxxD.dll dependencies). If you compile in release, the dependencies will be the same (in the sense that you'll need Qt5CoreX, etc etc), but the size of the .dll's will be significantly reduced.
So although there are still a lot of dependencies and your distributable's size may still be larger than hoped or desired, it isn't quite as bleak as it seemed at first glance :)
-
Hi,
yes thats correct, this was the debug Version. Release Version is much smaller.
I also added these 2 DLL Files:- libEGL
- libEGLD
now the application runs again. Don't know why dependency walker did not recognised that these dlls where missing.
-
DerManu, seems my preliminary optimism was misplaced. I can't even resolve all the new dependencies...on the verge of reverting back to 4.8.x.
-
Hi,
I want to run my qt project on another computer. I read your posts but I am not success.I put dll files in same folder of exe. Should I do anyting?
-
Hi hsrt.
Welcome to DevNet.
Usually i'd recommend start new topic and not post questions into old threads. But your question is so popular that you can find answer, just by searching in forum :) .
Take a look to those great manuals:
"Deploying Qt Applications":http://qt-project.org/doc/qt-5/deployment.html
"Deploy_an_Application_on_Windows":http://qt-project.org/wiki/Deploy_an_Application_on_Windows -
Hi qxoz,
I am newbie qt. This link says static build. Have to I do static link? I finished my project, I didn't create with static library my project. -
Hi,
No need to build statically (there's also licensing issues that you must first take a look at before releasing an application using a static Qt)
The second link of qxoz shows how to prepare the necessary dlls besides your application executable.