0

After successfully installing the Qt SDK 4.7.4 (MingW) and building an application I can find no way to deploy my program. Qt is really nice, but to deploy under Windows means to leave he surfaced road.

First the executable requires QtCore4.dll plus some other DLLs, but the Creator does not copy them into the deploy folder. Do I really have to try DEPENDS.EXE, to find out which DLLs are required, and then cull them manually from somewhere under C:/QtSDK?

Be that as it may, preferably I want to link statically. There are few recipes on the net how this can be done (e.g. here and here). So I launched a Qt 4.7.4 Desktop (MingW) command prompt. The Qt Reference Documentation tells to run CONFIGURE.EXE, but there's no CONFIGURE.EXE and no CONFIGURE.CMD, not under C:/QtSDK and not under C:/.

What am I missing?

Community
  • 1
  • 1
Andreas Spindler
  • 7,568
  • 4
  • 43
  • 34
  • Just remember that if you statically link, you need to publish your source code under the terms of a license like the GPL, or buy a Qt license. – James Johnston Oct 20 '11 at 13:52
  • James, have you read [this announcement](http://qt.nokia.com/about/licensing/)? – Andreas Spindler Oct 20 '11 at 14:16
  • 3
    Yes, I heard about it when it first happened a couple years ago. But it is LGPL license, not something more permissive like BSD. You have to allow the user to change the Qt source code and recompile Qt, and plug the new user-modified binaries into your application. This is easy with DLLs (user swaps out DLL files) but not really possible if it's statically linked - unless you provided only the object files for your app and the user was expected to do the linking. A lot of people might not be aware of this restriction with LGPL. – James Johnston Oct 20 '11 at 14:22
  • It's really hard to compile a Qt app statically. If you don't really need it (i.e. if your boss/client is not forcing you to do it), just link dynamically. That will save you hours of troubles. – laurent Oct 20 '11 at 14:33
  • 1
    @Andreas - you probably installed the mingw build rather than the source. This is intended to dynamically link with mingw builds of your app. You can build from source statically - but as James said = don't! – Martin Beckett Oct 20 '11 at 15:31
  • James, thank you for this important hint about LGPL and Qt. For me it is ok to include the Qt DLLs. I'm just curious why Qt (Creator) not provides any hints. For example, I have 12 _QtCore4.dll_'s and 2 _libQtCore4.a_'s under C:/QtSDK, accompanied by 10 _mingwm10.dll_'s. So I just guessed which to use, and it worked O.o – Andreas Spindler Oct 21 '11 at 07:10

0 Answers0