Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

Qt Extended Single Exec

Introduction

By default Qt Extended compiles dynamically. This allows applications to be installed but increases the minimum size and startup time. If installable applications are not required Qt Extended can be built as single-exec. This uses static linking to put everything into a single multi-call binary (similar to how busybox works).

Costs/Benefits

The costs of using single-exec are:

The benefits of using single-exec are:

How it works

Libraries are compiled statically. Plugins are compiled as static libraries. Applications are compiled as static libraries. Static global initializers are used to register the plugins with the plugin manager. They are also used to register the quicklaunch applications with quicklauncher and the non-quicklaunch applications with the server. See Applications for information about how applications can be launched.

All of these static libraries are linked into the server creating a single binary. When the server starts it looks at argv[0] to determine which process it is.

The size benefit of single-exec is derived from static linking. When the linker combines the code, it performs various size optimizations such as:

Issues

One important thing to be aware of when building single-exec with additional 3rd-party components is that the symbols must not clash with those from other applications. The use of C++ namespaces would be a very good idea to avoid potential problems caused by this.

Building Single-exec

To build Qt Extended as a single-exec binary simply pass -singleexec to configure.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3