1

How can you compile an executable with static linking that also statically links in QtQuick / QtQuick2 so that you don't need separate qmldir files?

Background:

  1. Oddly (and unlike any other compiler I've used) I found out that you need a statically compiled version of Qt in order to generate a statically linked executable.
  2. When my app only appeared as a small blank window I searched and found out that, although the application is statically linked, you still need to have the relevant QtQuick / QtQuick.2 folders containing the qmldir files.

What I want is a single, self-contained, executable file.

I've tried this only on Windows, but I'm asking the question generically in case there are different solutions for different platforms. At present I'm interested in Windows desktop, Mac OS X desktop and iOS but it would be useful to know the situation across all supported platforms.

Community
  • 1
  • 1
Paul Masri-Stone
  • 2,843
  • 3
  • 29
  • 51
  • I've since found that my static version of Qt 5.7 doesn't have the problem - I get a single, self-contained, Windows executable, whereas my static version of Qt 5.5 does have the problem. Perhaps something was fixed between these versions??? – Paul Masri-Stone Aug 24 '16 at 08:38

0 Answers0