CuteBuilder options
CuteBuilder proposes the following options to configure Qt (via configure) and to tweak the compilation with Microsoft Visual C++ (by editing the QMAKESPEC configuration file):
Qt options - Qt parts
- Compile everything (full build)
- Compile the libraries (Qt Core, Qt Gui, …)
- Compile the tools (Qt Designer, Qt Assistant, Ql Linguist)
- Compile the example programs
- Compile qtdemo and the demonstration programs
Qt options - Libraries
- -no-webkit: do not compile the WebKit module
- -no-phonon: do not compile the Phonon module
- -no-qt3support: disable the Qt 3 support functionality
- -no-accessibility: do not compile accessibility support
Qt options - C++
- -no-exceptions: disable exceptions on platforms that support it
- -no-stl: do not compile STL support
- -no-rtti: do not compile runtime type information
Visual C++ options
- Use static version of the run-time library (/MT[d])
- Use Whole Program Optimization (/GL /LTCG)
- Use Multiple Processes (/MP)
Qt options - Qt parts
Compile everything (full build)
Compile all the different parts of Qt, including the numerous example and demo projects.
A full build takes a lot of time, and is not really useful in Release. It is also more likely to fail or to take an infinite amount of time to complete if you use advanced Visual C++ options like Whole Program Optimization or Use static version of the run-time library.
Compile the libraries (Qt Core, Qt Gui, …)
Build the Qt libraries wich are not excluded from compilation on the Libraries tab, plus the following tools:
- Meta-Object Compiler (moc)
- Resource Compiler (rcc)
- User Interface Compiler (uic)
- User Interface Compiler for Qt 3 .ui files (uic3)
Compile the tools (Qt Designer, Qt Assistant, Ql Linguist)
Build Qt Designer, Qt Assistant, and Qt Linguist tools. It also builds others programs, in particular:
- tools related to application translation (lrelease, lupdate)
- the Qt 3 to 4 porting tool (qt3to4)
- the legacy Qt Assistant (assistant_adp)
- some conversion tools for the old help formats (qhelpconverter, qhelpgenerator, qcollectiongenerator)
- a tool for running XQuery queries (xmlpatterns)
Compile the example programs
Build the example projects located in the /examples directory. As a result, the total time needed to compile Qt increases in a significant way.
It is recommended not to check this option in Release builds.
Compile qtdemo and the demonstration programs
Build the demo projects located in the /demos directory, and the qtdemo tool wich is responsible of presenting and launching these demos. As a result, the total time needed to compile Qt increases in a significant way.
It is recommended not to check this option in Release builds.
Qt options - Libraries
-no-webkit: do not compile the WebKit module (#define QT_NO_WEBKIT)
WebKit is an open source web browser engine which has been integrated into Qt. It provides facilities for rendering of HTML, XHTML and SVG documents, styled using CSS and scripted with JavaScript. At the same time Web content can be enhanced with native controls.
Compilation of the WebKit module fails if the Visual C++ Whole Program Optimization option is turned on, so you have to disable WebKit compilation if you want to compile Qt using Whole Program Optimization.
-no-phonon: do not compile the Phonon module (#define QT_NO_PHONON)
The Phonon multimedia framework is an abstraction layer that enables the use of audio and video content in Qt applications.
It provides functionality for playback of the most common multimedia formats, which can be read from files or streamed over a network.
The multimedia functionality is not implemented by Phonon itself, but by a back end. The backends of Qt use the media systems DirectShow (which requires DirectX) on Windows, QuickTime on Mac, and GStreamer on Linux.
Phonon module can only be used as a shared library (.dll), so you have to disable its compilation if you want to compile Qt as a static library (.lib).
-no-qt3support: disable the Qt 3 support functionality (#define QT_NO_QT3SUPPORT)
By default, Qt provides classes that ease porting from Qt 3 to Qt 4. These classes are grouped in the Qt3Support module.
If you are not concerned by Qt 3 source code compatibility, you can disable this module to reduce compilation time.
-no-accessibility: do not compile accessibility support (#define QT_NO_ACCESSIBILITY)
Accessible applications can be used by people who are not able to use applications by conventional means.
By default, elements of the QtGui module are accessible objects (also called AT Servers): they provide specialized input and output methods to enable accessibility tools (also called AT Clients) such as screen readers or braille displays to interact with them. In particular, QWidget defines the properties accessibleName and accessibleDescription if this option is activated.
On Windows, Qt supports Microsoft Active Accessibility (MSAA). This allows programs such as Narrator (located in the accessibility accessories) to work with Qt applications.
Use this option if you do not want your application to be accessibility enabled (not recommended).
Qt options - C++
-no-exceptions: disable exceptions on platforms that support it (#define QT_NO_EXCEPTIONS)
The Qt source code uses some try…catch blocks in few places mostly to be exception safe (in particular when an exception is thrown within one of your slot and reaches the Qt kernel).
If you do not use C++ exceptions in your code and are not concerned by this aspect, you can ask Qt not to use the C++ exception mechanism at all by activating this option.
Visual C++ activates C++ exceptions usage by default since at least version 8 (VC++ 2005), so it is recommended not to activate this option.
-no-stl: do not compile STL support (#define QT_NO_STL)
By default, STL support is compiled, which provides better compatibility between Qt and STL containers.
For example, the member functions QString::toStdString() and QVector::fromStdVector() will not exist if you activate this option.
-no-rtti: do not compile runtime type information
Runtime type information (RTTI) is a standard C++ feature that allows the type of an object to be determined during program execution. This mechanism is used by the dynamic_cast<> and the typeid operators.
Qt implements its own RTTI mechanism based on its particular Qt Object Model and its Meta-Object Compiler (moc). Thus, it is possible to dynamically get type information about a Qt object without using the standard C++ RTTI mechanism, by using functions such as QObject::metaObject() or QMetaObject::className().
Qt does not use standard C++ RTTI at all. This option does not affect the Qt library itself, but the compatibility of its objects regarding the standard C++ RTTI mechanism.
Visual C++ activates RTTI by default at least since version 8 (VC++ 2005), which causes a small overhead to virtual objects table size, but not to the objects themselves, so its impact is really limited. As using dynamic_cast<> on a Qt object compiled with RTTI turned off leads to undefined behaviour, it is recommended not to activate this option unless you really know what you are doing.
Visual C++ options
Use static version of the run-time library (/MT[d])
By default, your programs are compiled to use and be linked with the dynamic version of the run-time library (CRT). As a consequence, your binaries are dependent on the dlls msvcr90d.dll and msvcp90d.dll in Debug, and msvcr90.dll and msvcp90.dll in Release.
If you select this option, the static version of the run-time library will be used, and your applications will no longer rely on these dlls. The drawback is that your binary file size may increase, and that you
must be really vigilant if you use other dlls.
In particular, this option is not compatible with the Qt plugin system. Do not select it if you are using other dlls such as Qt plugins, or if you do not really know what are the implications of the static version of the run-time library.
Use Whole Program Optimization (/GL /LTCG)
The Whole Program Optimisation (WPO), also known as Link Time Code Generation (LTCG), is an advanced optimization feature of Microsoft Visual C++ introduced in Visual C++ .Net (VC++ 7.0).
Whole program optimization allows the compiler to perform optimizations with information on all modules in the program. Without whole program optimization, optimizations are performed on a per module (compiland) basis.
With information on all modules, the compiler can:
- Optimize the use of registers across function boundaries.
- Inline a function in a module even when the function is defined in another module.
If you select this option, most of the compilation and code generation process is delayed at link time instead of compile time. As a result, compile time is reduced, but link time can be greatly increased, especially in the case of such a big library than Qt. So don’t be surprised neither anxious to get very long linking times.
Please note that compilation of the WebKit module fails when Whole Program Optimization is activated, so you have to disable the WebKit module in order to use WPO.
Use Multiple Processes (/MP)
The /MP option can reduce the total time to compile the source files. It causes the compiler to create one or more copies of itself, each in a separate process. Then these copies simultaneously compile the source files. Consequently, the total time to build the source files can be significantly reduced. Because no maximum number of processes that the compiler can create is given, Visual C++ decides by itself how many processes to use.
The /MP option only applies to compilations, not to linking or link-time code generation. It does not affect as well others tools like moc or uic.
The /MP option is officially supported since Visual C++ 2008 only, althought it is recognized by Visual C++ 2005 as well. To prevent any problem during the compilation (such as file corruption), this option is proposed only if you are using Visual C++ 2008.
This option is automaticaly turned on if you have more than one (logical) processor, otherwise it is off. This default behaviour should not be changed unless you know what you are doing.