|
| 1 | +//// |
| 2 | +Copyright (c) 2000, 2025 Contributors to the Eclipse Foundation |
| 3 | +This program and the accompanying materials |
| 4 | +are made available under the terms of the Eclipse Public License 2.0 |
| 5 | +which accompanies this distribution, and is available at |
| 6 | +https://www.eclipse.org/legal/epl-2.0/ |
| 7 | + |
| 8 | +SPDX-License-Identifier: EPL-2.0 |
| 9 | +//// |
| 10 | + |
| 11 | +// pull in shared headers, footers, etc |
| 12 | +:docinfo: shared |
| 13 | + |
| 14 | +// support image rendering and table of contents within GitHub |
| 15 | +ifdef::env-github[] |
| 16 | +:imagesdir: ../../images |
| 17 | +:toc: |
| 18 | +:toc-placement!: |
| 19 | +endif::[] |
| 20 | + |
| 21 | +// enable support for button, menu and keyboard macros |
| 22 | +:experimental: |
| 23 | + |
| 24 | +// Until ENDOFHEADER the content must match adoc-headers.txt for consistency, |
| 25 | +// this is checked by the build in do_generate_asciidoc.sh, which also ensures |
| 26 | +// that the checked in html is up to date. |
| 27 | +// do_generate_asciidoc.sh can also be used to apply this header to all the |
| 28 | +// adoc files. |
| 29 | +// ENDOFHEADER |
| 30 | + |
| 31 | +== Before you begin |
| 32 | + |
| 33 | +Depending on how you obtained the CDT, you might have also received a |
| 34 | +toolchain with a built-in CDT integration. However, if you downloaded |
| 35 | +the CDT from the Eclipse web site, then you will require a toolchain |
| 36 | +before you can build and debug any projects. |
| 37 | + |
| 38 | +The standard CDT supports integration with the GNU toolchain. This |
| 39 | +includes GNU's make, gcc compiler, and gdb debugger utilities. If you |
| 40 | +require a toolchain to build software for your development host, this is |
| 41 | +the best choice to get started. |
| 42 | + |
| 43 | +Each platform that runs the CDT requires different steps to acquire this |
| 44 | +toolchain. |
| 45 | + |
| 46 | +=== Windows |
| 47 | + |
| 48 | +For windows, MinGW and Cygwin are the two main platform choices for |
| 49 | +acquiring the GNU toolchain. It is important to understand the |
| 50 | +difference between them. Cygwin produces executables that use the Cygwin |
| 51 | +POSIX runtime. Note that this runtime is GPL licensed. MinGW produces |
| 52 | +native Windows executables that do not require a separate runtime. |
| 53 | + |
| 54 | +* For *MinGW*, it is recommended to use the MSYS2 software distribution. |
| 55 | +The CDT will automatically detect tools that are installed using the |
| 56 | +MSYS2 package manager. Download and run the latest MSYS2 installer by |
| 57 | +following instructions on the https://www.msys2.org/[MSYS2 Getting |
| 58 | +Started] page. When you reach the UCRT64 environment prompt, use the |
| 59 | +following commands to install individual tools: |
| 60 | ++ |
| 61 | +[cols="1,5,3"] |
| 62 | +|=== |
| 63 | +|Tool|Installation command|Notes |
| 64 | + |
| 65 | +|clang |
| 66 | +|`pacman -S mingw-w64-ucrt-x86_64-clang` |
| 67 | +|Provides the _LLVM with Clang_ toolchain |
| 68 | + |
| 69 | +|clangd |
| 70 | +|`pacman -S mingw-w64-ucrt-x86_64-clang-tools-extra` |
| 71 | +|Required by the _C/{cpp} Editor (LSP)_ |
| 72 | + |
| 73 | +|cmake |
| 74 | +|`pacman -S mingw-w64-ucrt-x86_64-cmake` |
| 75 | +|Required for building _CMake_ projects |
| 76 | + |
| 77 | +|gcc |
| 78 | +|`pacman -S mingw-w64-ucrt-x86_64-gcc` |
| 79 | +|Provides the _MinGW GCC_ toolchain |
| 80 | + |
| 81 | +|gdb |
| 82 | +|`pacman -S mingw-w64-ucrt-x86_64-gdb` |
| 83 | +|Required for debugging |
| 84 | + |
| 85 | +|make |
| 86 | +|`pacman -S make` |
| 87 | +|Required for building _Managed Build_ projects |
| 88 | + |
| 89 | +|ninja |
| 90 | +|`pacman -S mingw-w64-ucrt-x86_64-ninja` |
| 91 | +|Required for building _CMake_ projects |
| 92 | +|=== |
| 93 | + |
| 94 | +* *Cygwin* can be installed from the Cygwin site at |
| 95 | +https://www.cygwin.com. You need to manually select the gcc, gdb, and |
| 96 | +make packages to install the toolchain. Note that there is a |
| 97 | +https://github.com/eclipse-cdt/cdt/issues/228[known issue] with running |
| 98 | +recent versions of Cygwin gdb under the CDT. |
| 99 | +* The *Windows SDK* provides the Visual {cpp} compiler and header files |
| 100 | +and libraries required to create Windows applications. The CDT Visual |
| 101 | +{cpp} build integration will find these files based on where you installed |
| 102 | +the SDK. No other setup is required. + |
| 103 | +_Note:_ For this release, the integration should be considered beta |
| 104 | +quality. It is not recommended for production use. |
| 105 | + |
| 106 | +=== Linux |
| 107 | + |
| 108 | +All Linux distributions include the GNU toolchain. They may not, |
| 109 | +however, be installed by default. For instructions about installing the |
| 110 | +GNU toolchain for Linux, see the instructions for your particular |
| 111 | +distribution. |
| 112 | + |
| 113 | +=== Mac OS X |
| 114 | + |
| 115 | +The CDT supports the Apple GNU toolchain that is included in with the |
| 116 | +Xcode IDE. It can be downloaded from the Apple's developer site, |
| 117 | +https://developer.apple.com/[https://developer.apple.com] |
| 118 | + |
| 119 | +=== Other Platforms |
| 120 | + |
| 121 | +The GNU toolchain is supported on all platforms that the CDT supports. |
| 122 | +For instructions about installing the GNU toolchain on your platform, |
| 123 | +see your platform vendor. |
| 124 | + |
| 125 | +image:ngref.gif[Related reference,width=143,height=21] + |
| 126 | +* link:../concepts/cdt_o_home.htm[CDT Home] + |
| 127 | + |
| 128 | +image:ngtasks.gif[Related tasks] + |
| 129 | +* link:../tasks/cdt_t_manualbuild.htm[Building Manually] |
0 commit comments