PDA

View Full Version : Create exe file for Windows with libraries



arturs
22nd April 2015, 19:30
Hi
I wrote simple an application. The compiler created exe file etc
Unfortunately to the same catalogue I have to copy many dll files for proper working of my aplication.
After copying The aplication starts well on my computer (windows7) but for example in another computer It does not work (It is needed to copy more dll files)
I use MinGW 4.9.1 32bit compiler.

I would like to include to my exe files all libraries which are needed for proper working,

Please give me a link to a tutorial (I have read many tutorials but there were quite old and it did work well with my QT5.4

Regards
Artur

Santosh Reddy
23rd April 2015, 01:01
Qt for Windows - Deployment (http://doc.qt.io/qt-5/windows-deployment.html)

arturs
23rd April 2015, 11:35
Hi

Thank you for help.

It seems to be that I do not understand something.

In that instructions there is point
"cd C:\path\to\Qt
configure -static <any other options you need>"

I install QT here C:\Qt and in my catalogue there is no file configure :( where exactly should the file be ?

Regards
Artur

d_stranz
27th April 2015, 18:14
"configure" is used only if you are trying to build the Qt libraries from the Qt source code. You don't need to do that if all you want to do is to deploy an application you have already built using an installed version of Qt.

Skip everything in that article except the last section: "Creating the Application Package". That's the part you need to follow. If you are using a standard install of Qt, then you are using shared libraries not static ones. You need to make sure all of the required Qt DLLS are deployed with your app, and you also need to make sure the qwindows.dll library is in the platforms subdirectory of your app as well.