C++ programming with Qt

3D modeling, image editing, programming, text editing etc. Discussion here is not directly related to any game titles we feature.

Moderators: Lone Wolf, Snake Man

Post Reply
Snake Man
Commander-In-Chief
Posts: 9338
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

C++ programming with Qt

Post by Snake Man » 2009-04-07 04:35:57

C++ programming with Qt.

I just started to learn about C++ and I'm using Qt for it.

Immediately I came upon a first problem, I compiled from the file -> new menu the console application template, wrote in some code and when I compile it, the program now asks for "mingwm10.dll" file when I run it from run.bat file (if I just run it from Qt, it runs ok).

What do I need to know about the included DLL stuff?
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

vektorboson
Recruit
Posts: 17
Joined: 2005-08-09 04:12:23

Re: C++ programming with Qt

Post by vektorboson » 2009-04-07 12:39:13

Look into the Qt documentation under "Deploying an Application on Windows"; depending on what Qt-modules you have used you need to pack the necessary DLLs along with your EXE. Most probably you only need the following DLLs from your Qt's bin-directory:
QtCore4.dll
QtGui4.dll
mingwm10.dll

Those DLLs need to be in the exact same directory as the EXE when deploying. If there are still errors, then copy any additional DLLs, too.
When QtCreator compiles/runs the EXE, then it automatically tells the EXE where to find the DLLs; this is not true if starting the EXE from Explorer.

Snake Man
Commander-In-Chief
Posts: 9338
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Re: C++ programming with Qt

Post by Snake Man » 2009-04-07 13:28:01

Hmm wonder if this is the "DLL hell!" my other friend mentioned when we talked about windows GUI programming :)

So by packing, you mean when I release tool made by Qt there has to be those three (or even more) DLL's included in the rar archive, or do you mean that I can link them into the exe while compiling it?

I guess WrpTool was also released with two DLL files, but I don't know, it sounds lame that you have to include these kinds of dll files along with your tool. Or am I just not seeing the big picture here, again? :)
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

vektorboson
Recruit
Posts: 17
Joined: 2005-08-09 04:12:23

Re: C++ programming with Qt

Post by vektorboson » 2009-04-07 18:43:23

Snake Man wrote:Hmm wonder if this is the "DLL hell!" my other friend mentioned when we talked about windows GUI programming :)
Basically yes; the complete "DLL hell" contains different versioned DLLs (with possibly the same name).
So by packing, you mean when I release tool made by Qt there has to be those three (or even more) DLL's included in the rar archive, or do you mean that I can link them into the exe while compiling it?
Yes, you need to include those DLLs in the same directory (in the RAR archive) as the EXE. If you want static linking, then I assume you have to compile Qt yourself... So better do it with the DLLs.
Please note that Qt 4.5 is released under the LGPL; thus you should provide at least a link to QtSoftware's homepage, where people can obtain the source code to the Qt libraries, and don't forget that those Qt DLLs are LGPLed.
I guess WrpTool was also released with two DLL files, but I don't know, it sounds lame that you have to include these kinds of dll files along with your tool. Or am I just not seeing the big picture here, again? :)
Welcome to the world of programming my friend! Every language/framework has its quirks when deploying, for some you must install additional modules when you use anything that is not part of the language's standard library. Every application/program has runtime dependencies, and doing self-contained executables is often a hard task.

Post Reply

Return to “General Editing (tools)”

Who is online

Users browsing this forum: No registered users and 14 guests