how to get executable of a Qt project inorder to run it different machine?
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...?
Re: how to get executable of a Qt project inorder to run it different machine?
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!
Re: how to get executable of a Qt project inorder to run it different machine?
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 :)..
Re: how to get executable of a Qt project inorder to run it different machine?
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).
Re: how to get executable of a Qt project inorder to run it different machine?
... and you can't use plugins with static linking.
Re: how to get executable of a Qt project inorder to run it different machine?
Quote:
Originally Posted by
wysota
... and you can't use plugins with static linking.
true that :P
jajaja
Re: how to get executable of a Qt project inorder to run it different machine?
Quote:
Originally Posted by
KillGabio
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" !!!
Re: how to get executable of a Qt project inorder to run it different machine?
Do you use gcc or MSVC? And have you build the executable in release mode?
Re: how to get executable of a Qt project inorder to run it different machine?
Quote:
Originally Posted by
Lykurg
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...
Re: how to get executable of a Qt project inorder to run it different machine?
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.
Re: how to get executable of a Qt project inorder to run it different machine?
Dependency walker is your friend.
Just run it on target box and load the executable, it will tell you exacly what's missing.