PDA

View Full Version : Application Issue



Scorch
28th October 2010, 01:37
I'm having a problem with my program.
It compiles fine and i've tested that everything works,
But the .exe it makes wont open outside of QT.
I can't open the file and don't know the source of the problem as the .exe simply doesn't open, not even in task manager. No error messages, it just doesn't open.
How can I fix this?

waynew
28th October 2010, 02:14
Did you include the Qt dlls required for your application in the directory with the .exe?
Like QtCore4.dll, etc.

Scorch
28th October 2010, 03:10
Did you include the Qt dlls required for your application in the directory with the .exe?
Like QtCore4.dll, etc.

I do not believe I have.
How would I go about doing this?

ChrisW67
28th October 2010, 03:49
Read the "Deploying an Application on Windows" in Assistant or here (http://doc.qt.nokia.com/latest/deployment.html)

Scorch
28th October 2010, 06:19
I tried the command(configure -static) in 2 different command prompts but it didn't work.
Displaying it was not recognized.

ChrisW67
28th October 2010, 07:45
The commands you tried are related to rebuilding Qt itself to provide static libraries. You need to be in the Qt source code directory for this to work. However you probably don't want to do this.

You can either:

Build for, and deploy with, dynamically linked libraries.
Build for static linkage with Qt. You will need to rebuild Qt to provided the required static libraries. Your application needs to specify static linkage also.

The option you choose will depend on what is already on the target machine and what license you are using Qt under. Generally you will need a Qt commercial licence to distribute a statically linked program program to anyone else.

With the out-of-the-box Qt SDK you will be using option 1 by default. This is the easiest option but requires you to ship some of the Qt DLL files with your application and install them in the locations described in the document. You need to read further down to the example of Qt Paint.