View Full Version : how to get executable of a Qt project inorder to run it different machine?
aurora
2nd February 2012, 14:08
I developed a Qt project in my computer(windows OS), now i want to execute this project in my friends machine, that machine doesn't have Qt installed...
What are the steps i need to proceed, to get executable of my project, which must execute in different machine...?
KillGabio
2nd February 2012, 15:18
when you try to run your application in the computer that doesnt have Qt you need to include the .DLL`s necessary to execute. If you try to run it you ll recieve error messages telling you what libraries you need to include. Most common are:
mingwm10.dll
QtCore4.dll
libgcc_s_dw2-1.dll
QtGui4.dll
And if you connect to a database include a folder named sqldrivers with the DLL you use. You`ll find those libs in the Qt SKD folder (where you installled Qt)
Hope it helps!
dieter
2nd February 2012, 18:02
If you need more information. A good search option "Static compile Qt", but since Qt is available to multiple platforms, each platform will be able to compile it himself :)..
ChrisW67
2nd February 2012, 23:34
Read: Deploying Qt Applications and the numerous time this exact question has been asked here.
My recommendation is that you use dynamic libraries unless you <i>must</i> have a static executable. The level of effort involved in producing a static executable, including all your dependencies, is comparable to writing an installer script for NSIS or another similar tool. A wholly static executable is complicated greatly if you use QTHelp, QtWebkit or Phonon which impose LGPL requirements for end-user relinking (even on commercial licence holders).
wysota
3rd February 2012, 00:28
... and you can't use plugins with static linking.
KillGabio
3rd February 2012, 01:45
... and you can't use plugins with static linking.
true that :P
jajaja
aurora
3rd February 2012, 06:04
when you try to run your application in the computer that doesnt have Qt you need to include the .DLL`s necessary to execute. If you try to run it you ll recieve error messages telling you what libraries you need to include. Most common are:
mingwm10.dll
QtCore4.dll
libgcc_s_dw2-1.dll
QtGui4.dll
And if you connect to a database include a folder named sqldrivers with the DLL you use. You`ll find those libs in the Qt SKD folder (where you installled Qt)
Hope it helps!
Thank u i got error message saying....
"The procedure entry point _Z5qFreePv could not be linked in the dynanic link library QtCore4.dll" !!!
Lykurg
3rd February 2012, 07:40
Do you use gcc or MSVC? And have you build the executable in release mode?
aurora
3rd February 2012, 08:30
Do you use gcc or MSVC? And have you build the executable in release mode?
I'm using GCC.
Ya i built the executable in release mode...
wysota
3rd February 2012, 11:03
It's likely you took the wrong QtCore4.dll. Take the one under "qt" subdirectory of your QtSDK installation. The same goes for the rest of libraries.
Spitfire
6th February 2012, 17:42
Dependency walker (http://www.dependencywalker.com/) is your friend.
Just run it on target box and load the executable, it will tell you exacly what's missing.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.