Compiling-ICU-with-MinGW

From Qt Wiki
Revision as of 15:09, 14 January 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Compiling ICU with MinGW

Qt 5 / QtWebkit requires ICU, which MinGW distributions do not ship.

Pre-built packages

The ICU Project site [site.icu-project.org] provides pre-compiled libraries for both 32 and 64 bit. However, these depend on the Microsoft Visual C++ 2010 runtime being installed.

download.qt.io [download.qt.io] also hosts packages for the MinGW toolchains Qt ships.

Compiling on your own

Requirements

How to build

Check that gcc is in PATH, otherwise add it, e.g.

Run configure && build:

This will generate a release shared build that you can use in both a debug and release build of Qt.

To link ICU statically (e.g. for a static release build of Qt), you have to append ‘—enable-static —disable-shared’ :

To link ICU statically and build it in debug mode (e.g. for a static debug build of Qt), you have to prepend ‘—enable-debug —disable-release’ to the arguments:

Finally, run make && make install

Using it

Add the include, lib folders to your compilation environment, e.g. for cmd.exe :

When you now run Qt’s configure.exe ICU should be detected, and Qt links against the libraries.

Categories: