doc/src/platforms/compiler-notes.qdoc
changeset 0 1918ee327afb
equal deleted inserted replaced
-1:000000000000 0:1918ee327afb
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** All rights reserved.
       
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
       
     6 **
       
     7 ** This file is part of the documentation of the Qt Toolkit.
       
     8 **
       
     9 ** $QT_BEGIN_LICENSE:LGPL$
       
    10 ** No Commercial Usage
       
    11 ** This file contains pre-release code and may not be distributed.
       
    12 ** You may use this file in accordance with the terms and conditions
       
    13 ** contained in the Technology Preview License Agreement accompanying
       
    14 ** this package.
       
    15 **
       
    16 ** GNU Lesser General Public License Usage
       
    17 ** Alternatively, this file may be used under the terms of the GNU Lesser
       
    18 ** General Public License version 2.1 as published by the Free Software
       
    19 ** Foundation and appearing in the file LICENSE.LGPL included in the
       
    20 ** packaging of this file.  Please review the following information to
       
    21 ** ensure the GNU Lesser General Public License version 2.1 requirements
       
    22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    23 **
       
    24 ** In addition, as a special exception, Nokia gives you certain additional
       
    25 ** rights.  These rights are described in the Nokia Qt LGPL Exception
       
    26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
       
    27 **
       
    28 ** If you have questions regarding the use of this file, please contact
       
    29 ** Nokia at qt-info@nokia.com.
       
    30 **
       
    31 **
       
    32 **
       
    33 **
       
    34 **
       
    35 **
       
    36 **
       
    37 **
       
    38 ** $QT_END_LICENSE$
       
    39 **
       
    40 ****************************************************************************/
       
    41 
       
    42 /*!
       
    43     \page compiler-notes.html
       
    44     \ingroup platform-specific
       
    45     \title Compiler Notes
       
    46     \brief Information about the C++ compilers and tools used to build Qt.
       
    47 
       
    48     This page contains information about the C++ compilers and tools used
       
    49     to build Qt on various platforms.
       
    50 
       
    51     \tableofcontents
       
    52 
       
    53     Please refer to the \l{Platform Notes} for information on the platforms
       
    54     Qt is currently known to run on, and see the \l{Supported Platforms}
       
    55     page for information about the status of each platform.
       
    56 
       
    57     If you have anything to add to this list or any of the platform or
       
    58     compiler-specific pages, please submit it via the \l{Bug Report Form}
       
    59     or through the \l{Public Qt Repository}.
       
    60 
       
    61     \section1 Supported Features
       
    62 
       
    63     Not all compilers used to build Qt are able to compile all modules. The following table
       
    64     shows the compiler support for five modules that are not uniformly available for all
       
    65     platforms and compilers.
       
    66 
       
    67     \table
       
    68     \header \o Compiler \o{5,1} Features
       
    69     \header \o                  \o Concurrent \o XmlPatterns \o WebKit   \o CLucene  \o Phonon
       
    70     \row    \o g++ 3.3          \o            \o \bold{X}    \o          \o \bold{X} \o \bold{X}
       
    71     \row    \o g++ 3.4 and up   \o \bold{X}   \o \bold{X}    \o \bold{X} \o \bold{X} \o \bold{X}
       
    72     \row
       
    73     \row    \o SunCC 5.5        \o            \o             \o          \o \bold{X} \o \bold{X}
       
    74     \row
       
    75     \row    \o aCC series 3     \o            \o             \o          \o \bold{X} \o \bold{X}
       
    76     \row    \o aCC series 6     \o \bold{X}   \o \bold{X}    \o \bold{X} \o \bold{X} \o \bold{X}
       
    77     \row    \o xlC 6            \o            \o             \o          \o \bold{X} \o \bold{X}
       
    78     \row    \o Intel CC 10      \o \bold{X}   \o \bold{X}    \o \bold{X} \o \bold{X} \o \bold{X}
       
    79     \row
       
    80     \row    \o MSVC 2003        \o \bold{X}   \o \bold{X}    \o          \o \bold{X} \o \bold{X}
       
    81     \row    \o MSVC 2005 and up \o \bold{X}   \o \bold{X}    \o \bold{X} \o \bold{X} \o \bold{X}
       
    82     \endtable
       
    83 
       
    84     \target GCC
       
    85     \section1 GCC
       
    86 
       
    87     \section2 GCC on Windows (MinGW)
       
    88 
       
    89     We have tested Qt with this compiler on Windows XP.
       
    90     The minimal version of MinGW supported is:
       
    91 
       
    92     \list
       
    93     \o GCC 3.4.2
       
    94     \o MinGW runtime 3.7
       
    95     \o win32api 3.2
       
    96     \o binutils 2.15.91
       
    97     \o mingw32-make 3.80.0-3
       
    98     \endlist
       
    99 
       
   100     \section2 GCC 4.0.0
       
   101 
       
   102     The released package of the compiler has some bugs that lead to miscompilations.
       
   103     We recommend using GCC 4.0.1 or later, or to use a recent CVS snapshot of the
       
   104     GCC 4.0 branch. The version of GCC 4.0.0 that is shipped with Mac OS X 10.4
       
   105     "Tiger" is known to work with Qt for Mac OS X.
       
   106 
       
   107     \section2 HP-UX
       
   108 
       
   109     The hpux-g++ platform is tested with GCC 3.4.4.
       
   110 
       
   111     \section2 Solaris
       
   112 
       
   113     Please use GCC 3.4.2 or later.
       
   114 
       
   115     \section2 Mac OS X
       
   116 
       
   117     Please use the latest GCC 3.3 from Apple or a later version of GCC 3.
       
   118     The gcc 3.3 that is provided with Xcode 1.5 is known to generate bad code.
       
   119     Use the November 2004 GCC 3.3 updater \l{http://connect.apple.com}{available from Apple}.
       
   120 
       
   121     \section2 GCC 3.4.6 (Debian 3.4.6-5) on AMD64 (x86_64)
       
   122 
       
   123     This compiler is known to miscompile some parts of Qt when doing a
       
   124     release build. There are several workarounds:
       
   125 
       
   126     \list 1
       
   127     \o Use a debug build instead.
       
   128     \o For each miscompilation encountered, recompile the file, removing the -O2 option.
       
   129     \o Add -fno-gcse to the QMAKE_CXXFLAGS_RELEASE.
       
   130     \endlist
       
   131 
       
   132     \section1 HP ANSI C++ (aCC)
       
   133 
       
   134     The hpux-acc-32 and hpux-acc-64 platforms are tested with aCC A.03.57. The
       
   135     hpuxi-acc-32 and hpuxi-acc-64 platforms are tested with aCC A.06.10.
       
   136 
       
   137     \section1 Intel C++ Compiler
       
   138 
       
   139     Qt supports the Intel C++ compiler on both Windows and Linux.
       
   140     However, there are a few issues on Linux (see the following
       
   141     section).
       
   142 
       
   143     \section2 Intel C++ Compiler for Linux
       
   144 
       
   145     Nokia currently tests the following compilers:
       
   146 
       
   147     \list
       
   148 
       
   149     \o Intel(R) C++ Compiler for applications running on IA-32,
       
   150     Version 10.1 Build 20080602 Package ID: l_cc_p_10.1.017
       
   151 
       
   152     \o Intel(R) C++ Compiler for applications running on Intel(R) 64,
       
   153     Version 10.1 Build 20080602 Package ID: l_cc_p_10.1.017
       
   154 
       
   155     \endlist
       
   156 
       
   157     We do not currently test the IA-64 (Itanium) compiler.
       
   158 
       
   159     \section2 Known Issues with Intel C++ Compiler for Linux
       
   160 
       
   161     \list
       
   162 
       
   163     \o Precompiled header support does not work in version 10.0.025
       
   164        and older. For these compilers, you should configure Qt with
       
   165        -no-pch. Precompiled header support works properly in version
       
   166        10.0.026 and later.
       
   167     \o Version 10.0.026 for Intel 64 is known to miscompile qmake when
       
   168        building in release mode. For now, configure Qt with
       
   169        -debug. Version 10.1.008 and later can compile qmake in release
       
   170        mode.
       
   171     \o Versions 10.1.008 to 10.1.015 for both IA-32 and Intel 64 are
       
   172        known crash with "(0): internal error: 0_47021" when compiling
       
   173        QtXmlPatterns, QtWebKit, and Designer in release mode. Version
       
   174        10.1.017 compiles these modules correctly in release mode.
       
   175     \endlist
       
   176 
       
   177     \section2 Intel C++ Compiler (Windows, Altix)
       
   178 
       
   179     Qt 4 has been tested successfully with:
       
   180 
       
   181     \list
       
   182     \o Windows - Intel(R) C++ Compiler for 32-bit applications,
       
   183        Version 8.1 Build 20050309Z Package ID: W_CC_PC_8.1.026
       
   184     \o Altix - Intel(R) C++ Itanium(R) Compiler for Itanium(R)-based
       
   185        applications Version 8.1 Build 20050406 Package ID: l_cc_pc_8.1.030
       
   186     \endlist
       
   187 
       
   188     We currently only test the Intel compiler on 32-bit Windows versions.
       
   189 
       
   190     \section1 MIPSpro (IRIX)
       
   191 
       
   192     \bold{IRIX is an unsupported platform. See the \l{Supported Platforms} page
       
   193     and Qt's Software's online \l{Platform Support Policy} page for details.}
       
   194 
       
   195     Qt 4.4.x requires MIPSpro version 7.4.2m.
       
   196 
       
   197     Note that MIPSpro version 7.4.4m is currently not supported, since it has
       
   198     introduced a number of problems that have not yet been resolved.
       
   199     We recommend using 7.4.2m for Qt development. However, please note the
       
   200     unsupported status of this platform.
       
   201 
       
   202     \target Sun Studio
       
   203     \section1 Forte Developer / Sun Studio (Solaris)
       
   204 
       
   205     \section2 Sun Studio
       
   206 
       
   207     Qt is tested using Sun Studio 12 (Sun CC 5.9). Go to
       
   208     \l{Sun Studio Patches} page on Sun's Web site to download
       
   209     the latest patches for your Sun compiler.
       
   210 
       
   211     Please note that Qt 4.6 is stricter in its STL requirements and
       
   212     that the default STL implementation used by Sun CC does not pass
       
   213     those requirements. This does not affect binary compatibility and
       
   214     you can continue to use STL in your own code, but Qt's
       
   215     STL-compatibility functions will be disabled.
       
   216 
       
   217     Sun CC ships with a secondary STL implementation (called stlport4)
       
   218     which is standards-compliant and can be used by Qt. You can enable
       
   219     it by passing the -library=stlport4 option to the compiler. Note
       
   220     that this does not affect Qt's binary compatibility, but it may
       
   221     affect that of other libraries and programs that use STL.
       
   222 
       
   223     \section2 Sun WorkShop 5.0
       
   224 
       
   225     Sun WorkShop 5.0 is not supported with Qt 4.
       
   226 
       
   227     \section1 Visual Studio (Windows)
       
   228 
       
   229     We do most of our Windows development on Windows XP, using Microsoft
       
   230     Visual Studio .NET 2005 and Visual Studio 2008 (both the 32- and 64-bit
       
   231     versions).
       
   232 
       
   233     Qt works with the Standard Edition, the Professional Edition and Team
       
   234     System Edition of Visual Studio 2005.
       
   235 
       
   236     We also test Qt 4 on Windows XP with Visual Studio .NET and Visual Studio 2003.
       
   237 
       
   238     In order to use Qt with the Visual Studio 2005/2008 Express Edition you need
       
   239     to download and install the platform SDK. Due to limitations in the
       
   240     Express Edition it is not possible for us to install the Qt Visual
       
   241     Studio Integration. You will need to use our command line tools to
       
   242     build Qt applications with this edition.
       
   243 
       
   244     The Visual C++ Linker doesn't understand filenames with spaces (as in
       
   245     \c{C:\Program files\Qt\}) so you will have to move it to another place,
       
   246     or explicitly set the path yourself; for example:
       
   247 
       
   248     \snippet doc/src/snippets/code/doc_src_compiler-notes.qdoc 0
       
   249 
       
   250     If you are experiencing strange problems with using special flags that
       
   251     modify the alignment of structure and union members (such as \c{/Zp2})
       
   252     then you will need to recompile Qt with the flags set for the
       
   253     application as well.
       
   254 
       
   255     If you're using Visual Studio .NET (2002) Standard Edition, you should be
       
   256     using the Qt binary package provided, and not the source package.
       
   257     As the Standard Edition does not optimize compiled code, your compiled
       
   258     version of Qt would perform suboptimally with respect to speed.
       
   259 
       
   260     With Visual Studio 2005 Service Pack 1 a bug was introduced which
       
   261     causes Qt not to compile, this has been fixed with a hotfix available
       
   262     from Microsoft. See this
       
   263     \l{http://qt.nokia.com/developer/faqs/faq.2006-12-18.3281869860}{Knowledge Base entry}
       
   264     for more information.
       
   265 
       
   266     \section1 IBM xlC (AIX)
       
   267 
       
   268     The makeC++SharedLib utility must be in your PATH and be up to date to
       
   269     build shared libraries. From IBM's
       
   270     \l{http://www.redbooks.ibm.com/abstracts/sg245674.html}{C and C++ Application Development on AIX}
       
   271     Redbook:
       
   272 
       
   273     \list
       
   274     \o "The second step is to use the makeC++SharedLib command to create the
       
   275        shared object. The command has many optional arguments, but in its
       
   276        simplest form, can be used as follows:"
       
   277        \snippet doc/src/snippets/code/doc_src_compiler-notes.qdoc 1
       
   278     \o "The full path name to the command is not required; however, to avoid
       
   279        this, you will have to add the directory in which it is located to
       
   280        your PATH environment variable. The command is located in the
       
   281        /usr/vacpp/bin directory with the VisualAge C++ Professional for AIX,
       
   282        Version 5 compiler."
       
   283     \endlist
       
   284 
       
   285     \section2 VisualAge C++ for AIX, Version 6.0
       
   286 
       
   287     Make sure you have the
       
   288     \l{http://www-1.ibm.com/support/search.wss?rs=32&tc=SSEP5D&dc=D400}{latest upgrades}
       
   289     installed.
       
   290 */