PDA

View Full Version : Deploying



Svalorzen
9th June 2010, 23:21
Hi everybody! I'm new here =)
Today I downloaded the free version of qt and I'm starting to understand how it works, and it's pretty nice! =D

But, I've managed to screw all up. Let me explain.

I was following the tutorials and learning the basics of qt, when, while running a little window with a button and a slider on it, I decided to look at the ram usage of my app. 17 Mb. I was a little shocked. But then I thought that it was probably due to the fact that I was running the up under the qt environment, and that normally it would've taken much less memory to run.

So I started to read how to deploy statically an app, since the simple exe in the debug folder was refusing to run even after adding in the same folder the dlls it was asking. I arrived to this (http://doc.qt.nokia.com/4.1/deployment-windows.html) page, which is also included in the qt help. I followed the instruction, but I stumbled into this (http://bugreports.qt.nokia.com/browse/QTBUG-11249?page=com.atlassian.jira.plugin.system.issuet abpanels%3Acomment-tabpanel) bug. Now, I thought it was probably my fault, and I didn't understand well the instructions, so I reconfigured the qt environment with the -no-qt3support option, and I remade the exact same thing, and this time everything compiled ( in more than 6 hours, I must say =P ). Still, everything is broken. Everytime I try to compile something, there is always the error stated in the bug page.

I guess I'll have to reinstall the whole thing, but I wanted to know better how should I do to create a standalone exe for win\linux\mac. Isn't there a more simple method? Or didn't I understand anything?

Thanks alot for your time! =)

SixDegrees
9th June 2010, 23:40
The bug you had problems with is reported against Qt v4.7. This version has not yet been released; it is still in development. The most recent stable release is 4.6.3. Unless you're doing Qt development, get the stable release, not the development snapshots.

Svalorzen
9th June 2010, 23:48
Umm.. I've got the 4.6.2.. the link I posted was the only one I found which referred to my same problem, so that convinces me more that I made I mistake somewhere, even though I couldn't say where..

If you need me to post screenshots of the compiler or other things feel free to ask, I just don't know what could be useful to post =P

squidge
10th June 2010, 00:03
You have it the wrong way around. If you use DLL, multiple applications can use those same dlls at the same time. So you have one copy of the DLL in memory regardless of the amount of applications using it. If you use static, then you have a copy of the DLL in memory for every statically linked application, PLUS a copy of the DLL in memory for any applications that use that. You end up wasting a lot of memory.

Also, statically linking forces more licensing restrictions such as your app should be open source or you need to purchase license etc.

Svalorzen
10th June 2010, 00:26
Also, statically linking forces more licensing restrictions such as your app should be open source or you need to purchase license etc.

Oh, didn't read that. Well, anyway, I still don't get how to deploy. I'm now reinstalling the qt environment, with the hope that it will fix the damage I've done to it.

How should I do to create a working app of anything? Knowing how to do both static and dynamic would be very nice anyway, depending on what I plan to do =)
As of now I just know how to build and to get an exe out of the qt environment, which will not run if opened by itself.

Thanks again!

Zlatomir
10th June 2010, 00:35
Download the Windows SDK from here (http://qt.nokia.com/downloads/sdk-windows-cpp) (you don't need to configure or build if you link dynamically <default>) and copy the dll's like myself and Wysota said in this topic (http://www.qtcentre.org/threads/31361-How-do-I-make-my-project-executable-file) to deploy on windows that doesn't have Qt installed

LE: the link to Qt is to the open source version (LGPL)

Svalorzen
10th June 2010, 00:50
Thanks, I just reinstalled the qt ide and it's working fine. About the thread you linked me, I'm having a problem with both the QtCore4.dll files. If I copy the one in the /bin file I get this error: "Insert point _Z5qFreePv of the procedure cannot be found in the dynamic connection library QtCore4.dll", while if I copy the one in qt/bin I get this error:"Insert point ?trUtf8@QMetaObject@@QBE?AVQString@@PBD0H@Z of the procedure cannot be found in the dynamic connection library QtCore4.dll"

Zlatomir
10th June 2010, 01:30
The one from qt\bin is the right one (and there you find other dll's, when you will use some more functionality)

That error usually comes from some miss-match with dll versions, did you download the new version (4.63)? If you did rebuild your application, and make sure you copy from the right folder (qt will make different folder for all versions installed).

Svalorzen
10th June 2010, 01:48
I am using the qt sdk, and with that I got the 4.62.. how should I do to upgrade it? Also, is that a big deal?

I'm sure I'm copying the files from the right directories, but the error still shows up.. I builded into the release folder and I'm using that exe..