This is mainly about Linux under the compilation, Windows is relatively simple
Reference: Http://qt-project.org/wiki/Building-Qt-5-from-Git
Depend on
sudo apt-get install "^libxcb.*" Libx11-xcb-dev Libglu1-mesa-dev libxrender-dev Libxi-dev
Compilation options
Configure-confirm-license-opensource-static-release-no-qml-debug-qt-freetype-qt-xcb-nomake Tests-nomake Examples -skip qtwebkit-prefix/usr/local/qt-5.3.2-static
1. Here The-qt-freetype must be added, In addition to check configure after the fontconfig is not yes, if not, Chinese blank
If Fontconfig is no, execute the sudo apt-get install libfontconfig*, install the Libfontconfig1-dev and other development packages, and then configure
2. The-QT-XCB here should look like the XCB library that compiles QT internals, with this, you can install a lot of LIBXCB development packages less
Qtcreator Compilation settings
1. First select the Qmake.exe under the Qt-5.3.2-static directory via QT Versions, then qtcreator automatically identify
2. Then go to the build suite to copy a configuration, qt version Select Qt-5.3.2-static
3. Then open the. Pro file, add the config + = static
Command-line compilation settings
CD Engineering catalog, qmake generate makefile, modify makefile Cxxflag options, add-static, and then make directly, feeling this is smaller than the qtcreator generated,
You can also generate an executable program in the current directory
Problems that you may encounter
1.no module found Qt:script-private, this reason has been tested, found that as long as separate into the Qtscript engineering directory to compile separately, and then exit, all make Once is OK
2. Chinese blank, as above, is compiled when not selected-qt-freetype or Fontconfig development package not installed
3.unicode/uchar.h this is because of the compilation Qwebkit caused, the reason is unknown, skip can be
OK, it's all over!
Note-linux under Qt5.3.2 static compilation