PDA

View Full Version : Something i am not understand about Qt.



HeX0R
10th February 2010, 17:40
Hi.
I toke some of the example application that come with the Qt Creator.
When i pressed the Build button, the application ran as excepted...
but after that, when i tried to run the compiled executable i got an error about a missing DLLs or wrong EP...

so how can i deploy a software???
am i need do attach some additional biggest DLLs like QtGuid4.dll only for a little app?
or the end-user need to install some "run-time" like in .NET?

Lesiok
10th February 2010, 18:01
1. Yes, you need to attach this "biggest DLLs" :)
2. If You compile with mingw You should add some runtime dlls.

Second method is to build application statically, but this is possible only with commercial licence of Qt.

HeX0R
10th February 2010, 18:12
i have a commercial license, how can i do that?

Its funny... even Microsoft give things like that fre... :confused::o

About 1, if this is the case its better to use .NET to implement little app in windows platform...

Palmik
10th February 2010, 19:09
Placing
CONFIG += static somewhere into your *.pro file should do the trick (some addition configuration might be required however)... you shall not (as far as I know) even need the commercial version of Qt to do this.

squidge
10th February 2010, 19:21
What do Microsoft give for free that Qt doesn't? If you use Qt, you have to distribute the DLLs for free projects (or make your app open source). If you use Visual Studio, you have to distribute the Visual Studio DLLs with your project. If you want to use .NET, you have to distribute the .NET DLLs with your project. I see no difference. Visual Studio/.NET DLLs are more commonly installed, so maybe your code will run on more PCs without including them with your executable, but you can't depend on that and should include them yourself too.

.NET runtime is MUCH bigger than the Qt DLLs.

For static (no DLL) Qt, you will have to recompile the Qt library.

HeX0R
10th February 2010, 19:27
fatjuicymole, i am agree with you...
I meant what you said ".NET DLLs are more commonly installed".

franz
10th February 2010, 21:28
On Linux however, the Qt libraries are more commonly installed, so depending on the actual audience of your little program, Qt might still be the better option. In any case, if you distribute your program under the GPL v3 terms, you can also statically link Qt into your program, provided you have the static libs, of course..

HeX0R
12th February 2010, 04:01
OK Thank you.
Another question...
If i will debug something in creator, the project will be build to an exe file, right?
then he will be executed normally, but if i will try to double-click on that exe i will get a message about the missing core4.dll or mingwm10.dll.
And in addition to that, the Demo application that come with the SDK executed an exe file (example program in this case) but when in tried to double-click on the particular exe
i got the nasty message...
why the Demo application can run Qt executable without problem?
They declared Qt's "working directory" or something?

aamer4yu
12th February 2010, 04:37
They declared Qt's "working directory" or something?
Yes..you installed Qt on some path... and when you install something there is always of what is installed and where. How do you guess uninstallers work :rolleyes:

Try to set path of Qt and mingw dll's in command prompt and try calling your application..it will run.
As far as my experience goes, I find using command prompt to set paths and use rather make changes in Environment variables on My Computer.