Qt Configure parameters are not fully explained

Source: Internet
Author: User

Just add a-fast parameter to OK. Other parameters depending on your situation, such as you do not need QT3 support can add-no-qt3support, or do not need to WebKit plug-in-no-webkit
Configuration parameter options:

The preceding is the * number that represents the default parameter. The + sign indicates that the function requirement is evaluated and the evaluation is successful before it is accepted.

-release ...... Debug off. No debug library, your own project can only be published, not debug (without Debugging library), if you are hard to compile debug version, you will be prompted to find Xxxxxd.dll

*-debug ....... Only debug library, not release the library, that is, the future of their own project can only debug, if you are hard to compile debug version, you will be prompted to find Xxxxx.dll

+-debug-and-release. Two libraries are included after compilation. It is best to compile two kinds of libraries

-opensource ..... Compile the open source version.

-commercial ..... Compile the commercial version. These two parameters are generally not specified, and configure begins to require you to select a version.

-developer-build ... Compile developer options.

*-shared ....... Dynamic compilation.

-static ....... Static link library. There seems to be a plugin that cannot be compiled statically.

*-no-fast ... configure generate all the project makefiles files and compile the

-fast ........ Only build the makefiles file for the project under the Library directory and subdirectories.

-no-exceptions ..... Turn off exception support

*-exceptions ... Turn on exception support.

-no-accessibility. Turn off support for Windows active controls.

*-accessibility ..... Support for Windows active controls.

-no-stl ....... No C + + standard library support

*-stl ...... ..... Standard library Support available

The angle brackets have a problem with blogger .....

-no-sql-... Disable SQL entirely, by default none is turned on.

-qt-sql-... Enable a SQL in the Qt Library.

-plugin-sql-enable SQL as a plugin to is linked to at runtime.

Available values for:

Mysql

Psql

Oci

Odbc

Tds

Db2

+ SQLite

Sqlite2

IBase

(Drivers marked with a ' + ' has been detected as available on the This system)

-system-sqlite ..... Use of SQLite from the operating system.

-no-qt3support ..... does not provide support for QT3 functions

-no-opengl ..... OpenGL function Support Not available

-platform ... The operating system and compiler you is building on.

(Default%qmakespec%)

-xplatform. The operating system and compiler you is cross compiling to.

See the README file for a list of supported operating systems and compilers.

-qtnamespace Wraps all Qt Library code in ' namespace name {...}

-D-... Add an explicit define to the preprocessor.

-I. ... ADD an explicit include path.

-L ... ADD an explicit library path.

-L ... ADD an explicit the library name, residing in a librarypath.

-graphicssystem specify which Graphicssystem should be used.

Available values for:

* Raster-software rasterizer

Opengl-using OpenGL accelleration, experimental!

-help,-H,-? ...... Display this information.

Third-party libraries

-qt-zlib ...... Use zlib to bind to Qt.

+-system-zlib .... Using the zlib of the operating system

See Http://www.gzip.org/zlib

-no-gif ....... Do not compile GIF file read support plugin

+-qt-gif ....... Compile GIF file read support plugin

See Src/plugins/imageformats/gif/qgifhandler.h

-no-libpng ..... PNG support plug-in is not compiled.

-qt-libpng ..... Compile the PNG support plugin.

+-system-libpng ..... Using the System libpng library

See Http://www.libpng.org/pub/png

-no-libmng ..... Do not compile MNG support plug-ins.

-qt-libmng ..... Compile the MNG support plugin.

+-system-libmng ..... Using the system's MNG library

See http://www.libmng.com

-no-libtiff ..... TIFF support Plug-in is not compiled.

-qt-libtiff ..... Compile the TIFF support plugin.

+-system-libtiff .... Using the system's Libtiff library

See http://www.libtiff.org

-no-libjpeg ..... Do not compile the JPEG support plugin Library

-qt-libjpeg ..... Compiling the JPEG Support plugin Library

+-system-libjpeg .... Using the system's JPEG support library

See http://www.ijg.org

The following parameters are valid only for QT for Windows

-no-dsp ....... Do not generate VC + +. DSP documentation.

*-dsp ...... ..... Generate VC + +. DSP documentation, the platform identifier "WIN32-MSVC" is required. Note that QT4 does not support vc6.0 at first, so these two parameters are not valid.

-no-vcproj ..... VC + + is not generated. vcproj Documentation

*-vcproj ....... Generate VC + +. Vcproj documentation requires the platform identifier "Win32-msvc.net". That is, the compilation environment above VS2003

-no-incredibuild-xge does not add incredibuild xge distribution commands to custom build steps.

+-incredibuild-xge. ADD incredibuild xge distribution commands to custom build steps. This would distribute MOC and UIC steps, and other custom buildsteps which is added to the INCREDIBUILD_XGE variable.

(The IncrediBuild distribution commands is only added to Visual Studio projects)

The-no-plugin-manifests plugin does not embed manifests.

*-plugin-manifests. Plug-in embedded manifests.

-no-qmake ..... Do not compile Qmake

*-qmake ....... Compile the qmake. Do not recommend not compiling qmake

-dont-process ... Makefiles and project documents are not generated. Higher priority than the-no-fast parameter

*-process ...... Generate Makefiles and project documents.

-no-rtti ...... Run-time type information is not compiled.

*-rtti ..... ..... Compile run-time type information.

Here is the support for the directive, which does not explain

-no-mmx ....... Compile with use of MMX instructions

+-mmx ...... ..... Compile with use of MMX instructions

-no-3dnow ..... Do not compile

With use of 3DNOW instructions

+ -3dnow ....... Compile with use of 3DNOW instructions

-no-sse ....... Don't compile with use of SSE instructions

+-sse ...... ..... Compile with use of SSE instructions

-no-sse2 ...... Do not compile with use of SSE2 instructions

+-sse2 ..... ..... Compile with use of SSE2 instructions

+-direct3d ..... Compile the Direct3D support in. Cannot detect Direct3D SDK is not supported

-no-openssl ..... Do not compile on OpenSSL support

+-openssl ...... Compile in Run-time OpenSSL support

-openssl-linked .... Compile in linked OpenSSL support

-no-dbus ...... Do not compile in D-bus support

+-dbus ..... ..... Compile in D-bus support and load libdbus-1 dynamically

-dbus-linked ..... Compile in D-bus support and link to libdbus-1

-no-phonon ..... Do not compile the Phonon module in

+-phonon ....... Compile the Phonon module (the Phonon module will be compiled automatically if the canonical C + + compiler is used)

-no-phonon-backend. Do not compile the platform-specific Phonon backend-plu

Gin

*-phonon-backend .... Compile in the platform-specific Phonon backend-plugin

-no-webkit ..... Without compiling the WebKit module, compiling the WebKit is very time consuming.

+-webkit ....... Compile the WebKit module (the WebKit module will be compiled automatically if the canonical C + + compiler is used)

-no-scripttools .... Do not build the Qtscripttools module.

*-scripttools ..... Build the Qtscripttools module.

-arch ..... Appearance style.

There are several types of the following:

* Windows

WindowsCE

BoundsChecker

Generic

The-no-style-angle brackets contain the above style.

Compiling a qt takes too much time, often the more anxious it is, the slower it is to make up. In fact, through a few simple strokes can help you save time to compile. Here are one by one way to go:

The first trick is to determine which features are unnecessary before compiling and simply crop the compilation tree.
For example, the most common, like demos, examples, although very valuable, but can be placed in the back of the time to compile a separate project, which can save a lot of time. In practice, the simplest way is to modify the Configure file, which has a field in the specified compiled directory:
Qt_default_build_parts= "Libs Tools examples Demos Docs translations"
examples, demos and docs can be removed from here, but be aware that nothing else can be removed.
If in the later use found that some small projects need to compile, you can use the general method of compiling QT program, that is, using the QT installation directory bin Qmake to generate makefile, the same can compile and test the example code, does not affect the use.

The second trick is to crop the QT module.
QT from the 4 version of the modular form, the independent function of the package in a separate library, so you can easily remove some of the unnecessary libraries, which can also save the compilation time and the use of hard disk space. QT's configure configuration provides a number of ways to set up the module, such as it supports-no-svg and-no-webkit, which can be removed by adding these options when configure. Correspondingly, there are many small functions that can be configured by configure parameters, and the specific reference configure–help output. When viewing configure Help, pay special attention to the contents of the plus *, which is the QT default configure option, sometimes the default option is not necessarily pleasing to the person oh.
QT Desktop version By default will be as much as possible to compile feature into, so there is a certain advantage, is that users can use all the QT function, but the disadvantage is also obvious, that is compiled out of the QT Super large, especially compiled debug version, basically to occupy 1 to 2G of space, So it is necessary to look at the options of Configure. In addition, by default, some plug-ins are not compiled, such as database plug-ins, often require users to compile their own needs, it should also be noted.

The third trick, for the configuration of the embedded version.
The embedded version of Qt natively supports feature cropping, and we can take advantage of this feature to make the QT library as small as possible. The specific approach is to make a qconfig-[myconfig].h feature file that defines which feature you want to remove from Qt. In the Configure of the "-qconfig myconfig" option, QT will be based on the configuration file you gave to compile, to achieve the purpose of clipping. It is emphasized here that this clipping method applies only to the embedded version. The myconfig here can be replaced by any name you like.
Some examples of qconfig header files have been given in the QT code, with the default compilation using full config, which is
Do not crop any feature. All QT pre-defined qconfig files can be found under src/corelib/global/, including Qconfig-minimal.h, Qconfig-small.h, Qconfig.medium.h, Qconfig-large.h and Qconfig-dist.h, that is, from the cutting amount from more to less can be according to. If you want to add your own configuration file, in order to create a qconfig-xxx.h-like file under Src/corelib/global, this xxx is the configure you want to pass in the Qconfig parameters. I tested the QT version is 4.4.1, this version of the build system has a small problem, that is, if you specify the Qconfig parameter is not actually qconfig-xxx.h file corresponding, build will not stop, it will only give a humble hint, The compilation process will continue, which is quite puzzling. And in this case, QT compilation uses the same configuration basically and fullconfig, in view of its confusing behavior, personally feel it is necessary to remind you that when using custom qconfig, make sure that the configuration file lil bit the location, and the Qconfig parameter to the correct.
Generally our recommendation is to compile a full version of the test stage on the desktop, and then summarize what feature can be removed based on your project's use of QT feature. There are countless dependencies between feature, and this problem is also difficult for many people. Specific dependencies can be consulted on Src/corelib/global/qfeatures.h and src/corelib/global/qfeatures.txt (documents that describe dependencies). In addition, QT also provides a visual configuration of the dependent tools, called Qconfig, in the Qtdir/tools/qconfig directory. The tool needs to be compiled based on the QT desktop version. As in my Linux system can be compiled with the following command:
CDQT−EMBEDDED−LINUX−COMMERCIAl− 4.4.1/tool< Span id= "mathjax-span-42" class= "Mi" >s / Qco nf ig Cdqt−embedded−linux−commercial−4.4.1/tools/qconfig/usr/local/trolltech/qt-4.4.3/bin/qmake
$ make
Run after compilation succeeds./qconfig, initial to open qfeatures.txt. Qconfig reads the file to generate a tree graph that clearly shows the dependencies between the feature. As shown, if you remove the Lineedit feature, the ComboBox used for the control will not continue to work. With this tool clipping QT becomes simple and intuitive, a lot easier.

After you have selected the feature you want to remove, click Menu File->save as. Will pop up the page to save the file, the name of the file should be defined as qconfig-xxx.h, so that you can pass the corresponding Qconfig parameters when configure. You can also open an existing qconfig-xxx.h file by selecting File->open, and edit the configuration faster by modifying the files you already have.
According to the author's test, the qte4.4.1 compiled without clipping is:
Libqtcore.so is 2.6M
Libqtgui.so is 9.5M
If you compile with small, you can narrow it down to:
Libqtcore.so is 2.0M
Libqtgui.so is 5.7M
The difference is still more obvious.

Http://www.cnblogs.com/elect-fans/archive/2012/03/28/2420647.html

Qt Configure parameters are not fully explained

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.