source: trunk/doc/src/developing-on-mac.qdoc@ 321

Last change on this file since 321 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 10.4 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4** Contact: Qt Software Information ([email protected])
5**
6** This file is part of the documentation of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial Usage
10** Licensees holding valid Qt Commercial licenses may use this file in
11** accordance with the Qt Commercial License Agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and Nokia.
14**
15** GNU Lesser General Public License Usage
16** Alternatively, this file may be used under the terms of the GNU Lesser
17** General Public License version 2.1 as published by the Free Software
18** Foundation and appearing in the file LICENSE.LGPL included in the
19** packaging of this file. Please review the following information to
20** ensure the GNU Lesser General Public License version 2.1 requirements
21** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
22**
23** In addition, as a special exception, Nokia gives you certain
24** additional rights. These rights are described in the Nokia Qt LGPL
25** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
26** package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you are unsure which license is appropriate for your use, please
37** contact the sales department at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42/*!
43 \page developing-on-mac.html
44 \title Developing Qt Applications on Mac OS X
45 \brief A overview of items to be aware of when developing Qt applications
46 on Mac OS X
47 \ingroup platform-notes
48
49 \tableofcontents
50
51 Mac OS X is a UNIX platform and behaves similar to other Unix-like
52 platforms. The main difference is X11 is not used as the primary windowing
53 system. Instead, Mac OS X uses its own native windowing system that is
54 accessible through the Carbon and Cocoa APIs. Application development on
55 Mac OS X is done using Xcode Tools, an optional install included on every
56 Mac with updates available from \l {http://developer.apple.com}{Apple's
57 developer website}. Xcode Tools includes Apple-modified versions of the GCC
58 compiler.
59
60
61 \section1 What Versions of Mac OS X are Supported?
62
63 As of Qt 4.5, Qt supports Mac OS X versions 10.3 (for \bold{deployment
64 only}, not for development), 10.4 and 10.5. It is usually in the best
65 interest of the developer and user to be running the latest updates to any
66 version. We test internally against Mac OS X 10.3.9 and Mac OS X 10.4.11 as
67 well as the updated release of Mac OS X 10.5.
68
69
70 \section2 Carbon or Cocoa?
71
72 Historically, Qt has used the Carbon toolkit, which supports 32-bit
73 applications on Mac OS X 10.3 and up. Qt 4.5 adds support for the Cocoa
74 toolkit, which requires 10.5 and provides 64-bit support.
75
76 This detail is typically not important to Qt application developers. Qt is
77 cross-platform across Carbon and Cocoa, and Qt applications behave
78 the same way when configured for either one. Eventually, the Carbon
79 version will be discontinued. This is something to keep in mind when you
80 consider writing code directly against native APIs.
81
82 The current binary for Qt is built for Carbon. If you want to choose which
83 framework Qt will use, you must build from scratch. Carbon or Cocoa is
84 chosen when configuring the package for building. The configure process
85 selects Carbon by default, to specify Cocoa use the \c{-cocoa} flag.
86 configure for a 64-bit architecture using one of the \c{-arch} flags (see
87 \l{universal binaries}{Universal Binaries}).
88
89 Currently, Apple's GCC 4.0.1 is used by default. When building on 10.5,
90 Apple's GCC 4.2 is also available and selectable with the configure flag:
91 \c{-platform macx-g++42}. GCC 3.x will \e not work. Experimental LLVM-GCC
92 support is available by passing in the \c{-platform macx-llvm} flag.
93
94 The following table summarizes the different versions of Mac OS X and what
95 capabilities are used by Qt.
96
97 \table
98 \header
99 \o Mac OS X Version
100 \o Cat Name
101 \o Native API Used by Qt
102 \o Bits available to address memory
103 \o CPU Architecture Supported
104 \o Development Platform
105 \row
106 \o 10.3
107 \o Panther
108 \o Carbon
109 \o 32
110 \o PPC
111 \o No
112 \row
113 \o 10.4
114 \o Tiger
115 \o Carbon