Note-linux under Qt5.3.2 static compilation

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.