PDA

View Full Version : Impression from a newbie



Rik
4th July 2010, 12:25
Hi all!

I'm new to Qt, Qt-Creator, and forum.
Comparing IDEs like Lazarus, Netbeans, Jabaco, Mono, vs Qt-Creator, I discover that the last one is quite intuitive in difficult things and the less intuitive in things that should be very simple.

I base this statement on a first impression trying to do a hello-world like gui application at a first glance and deploy to another machine.

I install Qt creator.
I develop the mini-application.
Test. Ok working.
Build a release for Win32.
Click on exe and even on the developmente environment don't work for lack of dependency.
OK, I don't even try to find dependencies and look forward on how to make a single exe with static lib.
Look around in every menu, but not any option.
Search on internet but everything brings to command line.

Look on help and found a page in the help. Good!
Let's see what it says: configure -static <options>
Nothing.
I add configure -static -release
Nothing
I note the error talking about platform not known
OK. What's the constant for win32?:confused:
So look forward to find this constant and found on internet could be win32-icc
Right it is.
The compilation end with a not too much encouraging info about the lacking of nmake... nmake that on the guide i should run after this step (the help say to type sub-src).
Looking on the entire tree: there is no nmake... because is a M$ tools.
So, don't having visual studio, search for that single file and download via web.
Now it works.
Now I have to continue the help guide to link the application to the static version of Qt, but I stop here.

This is a process that should be simplified or better explained.

This is my personal point of view. I know lots of people looking for IDEs for visual programming, and easy gui design and easy connection GUI->code. This product is on the road, but must simplify secondary aspects like the deployment and at least in the meantime release a better documentation.

Zlatomir
4th July 2010, 12:36
Careful with static link the Qt library (the open source one) you will need to release your application open source

And the run-time it isn't so difficult to understand.
On your computer you can add the environment variables path for Qt and MingW

Or you can copy the required dll's in the same folder with your application.exe

You need at least two dll's for MingW runtime:
mingwm10.dll and libgcc_s_dw2-1.dll
you can find this two in the: Qt_install_folder\mingw\bin

and if you used some Qt stuff (QtCore4.dll and QtGui4.dll) you find those dll's in: Qt_install_folder\qt\bin (DON'T COPY the ones from Qt_INSTALL_FOLDER\bin )

And for the client distributable use an installer to copy all the needed dll's.

squidge
4th July 2010, 13:38
There's a reason the default is to use dynamic libraries - is is because it is the most open and logical solution. If more than one application runs on your target machine using the same libraries, they will share a lot of code together, so memory and disk usage can be reduced. It also means people only have to download the libraries if they don't already have them. For example, updates for your application will be much smaller than if you use static linking where they have to download them each time.

This is why static application support is not "easy" - it is to try and persuade people to use dynamic linking, as it is the best solution.

If your rebuild Qt as statically linked, then you need to make sure you are still compliant to the Nokia license that comes with Qt. Your application has to be open source or you must buy commercial license.

Rik
4th July 2010, 14:52
Thank you very much for yout replies!


Careful with static link the Qt library (the open source one) you will need to release your application open source
Important information I really didn't even suppose.
I'll use the default dynamic linking.

ChrisW67
5th July 2010, 22:51
Open Assistant, go to the Index tab, type "deploy", and then read the "Deploying Qt Applications" and "Deploying an Application on Windows."

Being required to deploy dependencies with a program is hardly exclusive to Qt.