PDA

View Full Version : [QT4.6] Qt and Windows: after compiling, how to execute the application?



Wing_Zero
4th March 2010, 02:18
Hi at all,
My problem is simple I think (I'm a newbie): I've created a simple application in QT 4.6 under linux & windows. the same application.
While in linux, thanks to dynamic library, i can just execute the executable file, In windows if I click on the .exe it says me that cannot find some dll. That's right because windows hasn't dinamyc library. The only way I've found to start the application in windows is to execute it from the QT command shell.After I've Installed QT SDK.
Now I'm asking: Downloading a 300MB SDK and excute the application from command line it's really the only way to start the app on windows?(a little application of 2-3 Mb).
Doesn't really exist some light runtime library? Starting it from the shell it is the only way? It is really necessary to install the SDK?

I don't think so, otherwise the famous portability of QT wasn't really so good. It's just I'm a newbie, i'm sure! :).

Someone can help me?

Thanks in advance and sorry for my bad english :(

Wing

vishwajeet.dusane
4th March 2010, 03:39
Hi,
All you have to is export Qt bin path in your PATH environment variable
Here try this steps

assuming u know how to export environment variable on windows, otherwise follow this link http://support.microsoft.com/kb/310519

Set environment variable name QTDIR and set value to your Qt directory (Ex. C:\Qt\4.6.2)
edit environment variable name PATH and append value to it as %QTDIR%\bin;

Thats it, you application will start running on double click

Lesiok
4th March 2010, 06:55
Read this documents (http://doc.trolltech.com/4.6/deployment.html)

Wing_Zero
4th March 2010, 12:08
Tnx lesiok,
I've read that document but can't help me. I now that i have to static link my apps, but, in the sdk windows installation i've not the command "nmake" that the guide tell me to execute.

I've integrated in the sam folder the QT dll (like qtcore.dll & so on ) but when the program start tell me :" Impossible to find _Z5Freepv in the bookcase of dynamic library".
Why this? how can I fix it?

Lesiok
4th March 2010, 17:34
You must search on the forum. Problem was described many times.
As I remember (I don't use SDK) SDK have two versions of DLL's and You must copy correct version of this. Of course if You have exe compiled in debug mode You must have to copy debug mode Qt DLL's (letter d in name).

ad5xj
4th March 2010, 19:31
Windows does have dynamic libraries. They are just called dll's on Windows. See the solution described in the post on this forum titled ".EXE error when trying to run Application"