diff --git a/doc/org.eclipse.cdt.doc.user/images/c_cpp_project_wizard_cmake_properties.png b/doc/org.eclipse.cdt.doc.user/images/c_cpp_project_wizard_cmake_properties.png new file mode 100644 index 00000000000..276ef0f7264 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/c_cpp_project_wizard_cmake_properties.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/c_cpp_project_wizard_makefile.png b/doc/org.eclipse.cdt.doc.user/images/c_cpp_project_wizard_makefile.png new file mode 100644 index 00000000000..6b8b20b4eaa Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/c_cpp_project_wizard_makefile.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/c_cpp_project_wizard_makefile_properties.png b/doc/org.eclipse.cdt.doc.user/images/c_cpp_project_wizard_makefile_properties.png new file mode 100644 index 00000000000..fd3274704ac Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/c_cpp_project_wizard_makefile_properties.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cbs_build.png b/doc/org.eclipse.cdt.doc.user/images/cbs_build.png new file mode 100644 index 00000000000..1c1581b97d7 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cbs_build.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cbs_build_debug.png b/doc/org.eclipse.cdt.doc.user/images/cbs_build_debug.png new file mode 100644 index 00000000000..a3685303993 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cbs_build_debug.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cbs_build_settings_tab_cmake.png b/doc/org.eclipse.cdt.doc.user/images/cbs_build_settings_tab_cmake.png new file mode 100644 index 00000000000..2b5be8e3639 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cbs_build_settings_tab_cmake.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cbs_debug_cmake.png b/doc/org.eclipse.cdt.doc.user/images/cbs_debug_cmake.png new file mode 100644 index 00000000000..a5ab30da1cf Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cbs_debug_cmake.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cbs_debugging.png b/doc/org.eclipse.cdt.doc.user/images/cbs_debugging.png new file mode 100644 index 00000000000..31d827a316a Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cbs_debugging.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cbs_edit_launch_config_debug.png b/doc/org.eclipse.cdt.doc.user/images/cbs_edit_launch_config_debug.png new file mode 100644 index 00000000000..cd558d10316 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cbs_edit_launch_config_debug.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cbs_edit_launch_config_run.png b/doc/org.eclipse.cdt.doc.user/images/cbs_edit_launch_config_run.png new file mode 100644 index 00000000000..190ee357288 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cbs_edit_launch_config_run.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cbs_empty_cmake_project.png b/doc/org.eclipse.cdt.doc.user/images/cbs_empty_cmake_project.png new file mode 100644 index 00000000000..9922432e361 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cbs_empty_cmake_project.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cbs_existing_code_cmake.png b/doc/org.eclipse.cdt.doc.user/images/cbs_existing_code_cmake.png new file mode 100644 index 00000000000..189be9dec28 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cbs_existing_code_cmake.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cbs_existing_code_makefile.png b/doc/org.eclipse.cdt.doc.user/images/cbs_existing_code_makefile.png new file mode 100644 index 00000000000..b91fd4d495d Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cbs_existing_code_makefile.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cbs_launch_config_tab_debug.png b/doc/org.eclipse.cdt.doc.user/images/cbs_launch_config_tab_debug.png new file mode 100644 index 00000000000..9e096969108 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cbs_launch_config_tab_debug.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cbs_launch_config_tab_main.png b/doc/org.eclipse.cdt.doc.user/images/cbs_launch_config_tab_main.png new file mode 100644 index 00000000000..cfcffacb7f6 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cbs_launch_config_tab_main.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cbs_run_cmake.png b/doc/org.eclipse.cdt.doc.user/images/cbs_run_cmake.png new file mode 100644 index 00000000000..19f3d12ee6a Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cbs_run_cmake.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt_w_basic03a.png b/doc/org.eclipse.cdt.doc.user/images/cdt_w_basic03a.png index 4766fcca623..068fcd5c44f 100644 Binary files a/doc/org.eclipse.cdt.doc.user/images/cdt_w_basic03a.png and b/doc/org.eclipse.cdt.doc.user/images/cdt_w_basic03a.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt_w_basic03b.png b/doc/org.eclipse.cdt.doc.user/images/cdt_w_basic03b.png new file mode 100644 index 00000000000..85153d2da26 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/cdt_w_basic03b.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/launchbar.png b/doc/org.eclipse.cdt.doc.user/images/launchbar.png new file mode 100644 index 00000000000..cc56371cba6 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/launchbar.png differ diff --git a/doc/org.eclipse.cdt.doc.user/images/launchbar_preferences.png b/doc/org.eclipse.cdt.doc.user/images/launchbar_preferences.png new file mode 100644 index 00000000000..480831f1cf9 Binary files /dev/null and b/doc/org.eclipse.cdt.doc.user/images/launchbar_preferences.png differ diff --git a/doc/org.eclipse.cdt.doc.user/src/getting_started/cbs_build_project.adoc b/doc/org.eclipse.cdt.doc.user/src/getting_started/cbs_build_project.adoc new file mode 100644 index 00000000000..56154d2f85a --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/src/getting_started/cbs_build_project.adoc @@ -0,0 +1,116 @@ +//// +Copyright (c) 2000, 2025 Contributors to the Eclipse Foundation +This program and the accompanying materials +are made available under the terms of the Eclipse Public License 2.0 +which accompanies this distribution, and is available at +https://www.eclipse.org/legal/epl-2.0/ + +SPDX-License-Identifier: EPL-2.0 +//// + +// pull in shared headers, footers, etc +:docinfo: shared + +// support image rendering and table of contents within GitHub +ifdef::env-github[] +:imagesdir: ../../images +:toc: +:toc-placement!: +endif::[] + +// enable support for button, menu and keyboard macros +:experimental: + +// Until ENDOFHEADER the content must match adoc-headers.txt for consistency, +// this is checked by the build in do_generate_asciidoc.sh, which also ensures +// that the checked in html is up to date. +// do_generate_asciidoc.sh can also be used to apply this header to all the +// adoc files. +// ENDOFHEADER + +== Building a project + +During Core Build System (CBS) project creation a launch configuration +with the same name is created along with it. The Build settings are +managed in the *Build Settings* tab of the launch configuration. + +CBS projects rely on the xref:cbs_launchbar.adoc[Launch Bar]. Make +sure the launch bar is installed and enabled. + +=== Building for Run + +. Select the launch configurion of the project you want to build. +. Select launch mode *Run*. +. Press the *Build* button in the launch bar. +. Inspect the build output in the Console window. +. Find the build results in the Project Explorer. + +image:cbs_build.png[Build a project for Run] + +=== Building for Debug + +To build for Debug: + +. Select the launch configurion of the project you want to build. +. Select launch mode *Debug*. +. Press the *Build* button. +. Inspect the build output in the Console window. +. Find the build results in the Project Explorer. + +image:cbs_build_debug.png[Build a project for Debug] + +=== Changing build settings + +The launch configuration presents separate build settings for launch mode +Run and Debug. You will see the build settings depending on the selected +launch mode. + +To change Run build settings: + +. Set the launch mode to *Run* +. Edit the project's launch configuration. Click on the gear icon. + +image:cbs_edit_launch_config_run.png[Edit launch configuration] + +The edit launch configuration wizard will open. Select the *Build +Settings* tab. + +The only settings that can be changed are the build chain, and how +CMake or Make is called. There are no options to set pre-processor +symbols or include paths. This makes that the project can easily be +shared with other IDEs, command line, or continuous integration flows. + +The following picture shows the build settings of a CMake project. + +image:cbs_build_settings_tab_cmake.png[CMake build settings tab] + +=== Makefile projects BUILD_MODE + +For CBS Makefile projects the launch mode is passed to `make` via +environment variable `BUILD_MODE`. In the Makefile you can make use of +this variable to set the wanted `CFLAGS` per launch mode. + +[cols="1,1"] +|=== +|Launch mode | BUILD_MODE + +|Run +|run + +|Debug +|debug +|=== + +Here is some example code that makes use of `BUILD_MODE` to set the +wanted `CFLAGS`: + +[source,makefile] +---- +ifeq ($(BUILD_MODE),debug) + CFLAGS += -g -O0 +else ifeq ($(BUILD_MODE),run) + CFLAGS += -O2 +endif +---- + +icon:arrow-circle-right[] xref:cbs_run_project.adoc[Next: Running a project] diff --git a/doc/org.eclipse.cdt.doc.user/src/getting_started/cbs_debug_project.adoc b/doc/org.eclipse.cdt.doc.user/src/getting_started/cbs_debug_project.adoc new file mode 100644 index 00000000000..9cc076cb3e9 --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/src/getting_started/cbs_debug_project.adoc @@ -0,0 +1,81 @@ +//// +Copyright (c) 2000, 2025 Contributors to the Eclipse Foundation +This program and the accompanying materials +are made available under the terms of the Eclipse Public License 2.0 +which accompanies this distribution, and is available at +https://www.eclipse.org/legal/epl-2.0/ + +SPDX-License-Identifier: EPL-2.0 +//// + +// pull in shared headers, footers, etc +:docinfo: shared + +// support image rendering and table of contents within GitHub +ifdef::env-github[] +:imagesdir: ../../images +:toc: +:toc-placement!: +endif::[] + +// enable support for button, menu and keyboard macros +:experimental: + +// Until ENDOFHEADER the content must match adoc-headers.txt for consistency, +// this is checked by the build in do_generate_asciidoc.sh, which also ensures +// that the checked in html is up to date. +// do_generate_asciidoc.sh can also be used to apply this header to all the +// adoc files. +// ENDOFHEADER + +== Debugging a project + +Debugging a CBS project is done via the xref:cbs_launchbar.adoc[Launch Bar]. Make +sure the launch bar is installed and enabled. + +First build the project for Debug. +See xref:cbs_build_project.adoc[Building a project]. + +. Select the launch configuration of the project you want to run. +. Select launch mode *Debug*. +. Press the *Debug* button in the launch bar. +. Confirm the switch to the Debug Perspective. + +image:cbs_debug_cmake.png[Launch a CMake project for Debug] + +The Perspective will change to *Debug*, and you can start debugging. + +image:cbs_debugging.png[Debugging a CMake project] + + +=== Changing debug settings + +To change debug settings: + +. Set the launch mode to *Debug* +. Edit the project's launch configuration. Click on the gear icon. + +image:cbs_edit_launch_config_debug.png[Edit launch configuration] + +The edit launch configuration wizard will open. Notice that there are +now two extra tabs *Debugger* and *Source*, because the launch mode is +*Debug*. These are not present in launch mode *Run*. + +On the *Main* tab you can set an alternative C/C++ application, and +you can enable or disable build before launch. + +On the *Arguments* tab you specify optional arguments, and you can +change the working directory. + +On the *Environment* tab you define optional environment variables. + +On the *Debugger* tab you can set an alternative debugger. If the +debugger name is not an absolute path, CDT will look first for the +debugger in the selected toolchain in the *Build Settings* tab. When +it is not found in the toolchain the debugger is searched in the +*PATH* environment variable defined locations. + +On the *Source* tab extra paths outside the project folder can be +defined to look for source code. + +image:cbs_launch_config_tab_debug.png[Launch configuration debug tab] diff --git a/doc/org.eclipse.cdt.doc.user/src/getting_started/cbs_launchbar.adoc b/doc/org.eclipse.cdt.doc.user/src/getting_started/cbs_launchbar.adoc new file mode 100644 index 00000000000..208c8667195 --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/src/getting_started/cbs_launchbar.adoc @@ -0,0 +1,55 @@ +//// +Copyright (c) 2000, 2025 Contributors to the Eclipse Foundation +This program and the accompanying materials +are made available under the terms of the Eclipse Public License 2.0 +which accompanies this distribution, and is available at +https://www.eclipse.org/legal/epl-2.0/ + +SPDX-License-Identifier: EPL-2.0 +//// + +// pull in shared headers, footers, etc +:docinfo: shared + +// support image rendering and table of contents within GitHub +ifdef::env-github[] +:imagesdir: ../../images +:toc: +:toc-placement!: +endif::[] + +// enable support for button, menu and keyboard macros +:experimental: + +// Until ENDOFHEADER the content must match adoc-headers.txt for consistency, +// this is checked by the build in do_generate_asciidoc.sh, which also ensures +// that the checked in html is up to date. +// do_generate_asciidoc.sh can also be used to apply this header to all the +// adoc files. +// ENDOFHEADER + +== Launch Bar + +Core Build System (CBS) projects rely on the *Launch Bar*. Make sure +the _LaunchBar UI_ feature is installed and enabled. In the global +preferences the launch bar can be enabled or disabled. + +image:launchbar_preferences.png[Launch Bar preferences] + +The launch bar exists out of several components: + +image:launchbar.png[Launch Bar] + +. Build button, to launch a build. +. Run button, to launch a run. This button will change to a Debug +button in Debug mode. +. Stop button, to stop a Run or Debug session. +. Launch mode selector. To change between Run and Debug mode. +. Launch configuration selector. +. Edit launch configuration. To change the launch configuration +properties. +. Target selector. Not always visible. +. Edit target. + +icon:arrow-circle-right[] xref:cbs_build_project.adoc[Next: Building a +project] diff --git a/doc/org.eclipse.cdt.doc.user/src/getting_started/cbs_run_project.adoc b/doc/org.eclipse.cdt.doc.user/src/getting_started/cbs_run_project.adoc new file mode 100644 index 00000000000..a34d817582e --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/src/getting_started/cbs_run_project.adoc @@ -0,0 +1,67 @@ +//// +Copyright (c) 2000, 2025 Contributors to the Eclipse Foundation +This program and the accompanying materials +are made available under the terms of the Eclipse Public License 2.0 +which accompanies this distribution, and is available at +https://www.eclipse.org/legal/epl-2.0/ + +SPDX-License-Identifier: EPL-2.0 +//// + +// pull in shared headers, footers, etc +:docinfo: shared + +// support image rendering and table of contents within GitHub +ifdef::env-github[] +:imagesdir: ../../images +:toc: +:toc-placement!: +endif::[] + +// enable support for button, menu and keyboard macros +:experimental: + +// Until ENDOFHEADER the content must match adoc-headers.txt for consistency, +// this is checked by the build in do_generate_asciidoc.sh, which also ensures +// that the checked in html is up to date. +// do_generate_asciidoc.sh can also be used to apply this header to all the +// adoc files. +// ENDOFHEADER + +== Running a project + +Running a CBS project is done via the xref:cbs_launchbar.adoc[Launch Bar]. Make +sure the launch bar is installed and enabled. + +First build the project for Run. +See xref:cbs_build_project.adoc[Building a project]. + +. Select the launch configuration of the project you want to run. +. Select launch mode *Run*. +. Press the *Run* button in the launch bar. +. Inspect the program output in the Console window. + +image:cbs_run_cmake.png[Launch a CMake project for Run] + +=== Changing run settings + +To change run settings: + +. Set the launch mode to *Run* +. Edit the project's launch configuration. Click on the gear icon. + +image:cbs_edit_launch_config_run.png[Edit launch configuration] + +The edit launch configuration wizard will open. + +On the *Main* tab you can set an alternative C/C++ application, and +you can enable or disable build before launch. + +On the *Arguments* tab you specify optional arguments, and you can +change the working directory. + +On the *Environment* tab you define optional environment variables. + +image:cbs_launch_config_tab_main.png[Launch configuration main tab] + +icon:arrow-circle-right[] xref:cbs_debug_project.adoc[Next: Debugging a project] diff --git a/doc/org.eclipse.cdt.doc.user/src/getting_started/cbs_using_existing_code.adoc b/doc/org.eclipse.cdt.doc.user/src/getting_started/cbs_using_existing_code.adoc new file mode 100644 index 00000000000..60a67a37f31 --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/src/getting_started/cbs_using_existing_code.adoc @@ -0,0 +1,67 @@ +//// +Copyright (c) 2000, 2025 Contributors to the Eclipse Foundation +This program and the accompanying materials +are made available under the terms of the Eclipse Public License 2.0 +which accompanies this distribution, and is available at +https://www.eclipse.org/legal/epl-2.0/ + +SPDX-License-Identifier: EPL-2.0 +//// + +// pull in shared headers, footers, etc +:docinfo: shared + +// support image rendering and table of contents within GitHub +ifdef::env-github[] +:imagesdir: ../../images +:toc: +:toc-placement!: +endif::[] + +// enable support for button, menu and keyboard macros +:experimental: + +// Until ENDOFHEADER the content must match adoc-headers.txt for consistency, +// this is checked by the build in do_generate_asciidoc.sh, which also ensures +// that the checked in html is up to date. +// do_generate_asciidoc.sh can also be used to apply this header to all the +// adoc files. +// ENDOFHEADER + +== Using existing code + +This tutorial describes how to create a new Core Build System +(CBS) project for use with existing code. + +Using existing code is done by creating a new **empty** CDT project in +the top directory containing the existing source files. CDT project +files will be created in the existing source directory. + +=== Using an existing CMake project + +To create an empty CMake project in CDT select the template *Empty or Existing CMake +Project* in the *New C/{cpp} Project* wizard. + +image:cbs_empty_cmake_project.png[Empty or Existing CMake Project] + +In the *New CMake Project* wizard uncheck *Use default location* +and set the location of the existing code. + +image:cbs_existing_code_cmake.png[Existing code CMake] + +More information about creating a CMake project is described in +xref:new_cmake_proj.adoc[Creating a CMake project] + +=== Using an existing Makefile project + +Create a CBS Makefile project in CDT as described in +xref:new_cbs_makefile_proj.adoc[Creating a Core Build System Makefile project] +with the following changes: + +In the *New Makefile Project* wizard uncheck *Use default location*, +set the location of the existing code, and uncheck *Create Hello +World Source and Makefile example*. + +image:cbs_existing_code_makefile.png[Existing code Makefile] + +icon:arrow-circle-right[] xref:cbs_launchbar.adoc[Next: Launch Bar] diff --git a/doc/org.eclipse.cdt.doc.user/src/getting_started/cdt_o_tutorial.adoc b/doc/org.eclipse.cdt.doc.user/src/getting_started/cdt_o_tutorial.adoc index 85a43dc2e69..54f059d4309 100644 --- a/doc/org.eclipse.cdt.doc.user/src/getting_started/cdt_o_tutorial.adoc +++ b/doc/org.eclipse.cdt.doc.user/src/getting_started/cdt_o_tutorial.adoc @@ -36,7 +36,7 @@ Development Toolkit (CDT) to: * xref:cdt_w_prepare_workbench.adoc[Prepare the Workbench] * xref:cdt_w_basic.adoc[Create a simple application] * xref:new_cmake_proj.adoc[Creating a CMake project] -* xref:cdt_w_newproj.adoc[Create a Makefile project] +* xref:cdt_w_basic.adoc[Create a Managed Build System Makefile project] * xref:cdt_w_import.adoc[Import an existing project] * xref:cdt_w_newcpp.adoc[Create a {cpp} file] * xref:cdt_w_newmake.adoc[Create a makefile] diff --git a/doc/org.eclipse.cdt.doc.user/src/getting_started/cdt_w_basic.adoc b/doc/org.eclipse.cdt.doc.user/src/getting_started/cdt_w_basic.adoc index cacab2b2318..c008cd05615 100644 --- a/doc/org.eclipse.cdt.doc.user/src/getting_started/cdt_w_basic.adoc +++ b/doc/org.eclipse.cdt.doc.user/src/getting_started/cdt_w_basic.adoc @@ -28,18 +28,13 @@ endif::[] // adoc files. // ENDOFHEADER -== Tutorial: Creating a simple application +== Tutorial: Creating a Managed Build System Makefile project In this tutorial, you will use the CDT to create a simple 'Hello World' application. This tutorial describes the process of creating a new {cpp} project where the build is automatically managed by the CDT, and running the program. -*NOTE*: In earlier versions of the CDT, there were two separate project -types: Managed make (automatically generated a makefile) and Standard -make (required the user's makefile to build). Now with CDT, you just -select a project type, and that determines what build system to use. - To create a simple "Hello World" application using CDT, perform the following general steps: @@ -57,10 +52,13 @@ image:cdt_w_basic02.png[Select File > New > Project menu option,width=591,height=183] + . Select the type of project to create. For this tutorial, expand the -*{cpp}* folder and select *{cpp} Project* and click *Next*. +*C/{cpp}* folder and select *C/{cpp} Project* and click *Next*. + + +image:cdt_w_basic03a.png[Select project type] + + +. Select *{cpp} Managed Build* and click *Next*. + -image:cdt_w_basic03a.png[Select project -type,width=525,height=500] +image:cdt_w_basic03b.png[Select {cpp} Managed Build] + . The *{cpp} Project* wizard opens. + @@ -139,12 +137,6 @@ populated with objects created from your code. image:cdt_w_basic13.png[C Editor with Outline view,width=731,height=333] + -*NOTE:* You can specify a different editor, and add or modify existing -code templates in *Window > Preferences*. - + -*OPTIONAL*: You can type additional code in this file, and then save the -changes by clicking File > Save, or pressing *CTRL+S*. - + Next, you will need to build your project before you can run it. + . Build your project by pressing *CTRL+B*, or select the project in the diff --git a/doc/org.eclipse.cdt.doc.user/src/getting_started/cdt_w_newcpp.adoc b/doc/org.eclipse.cdt.doc.user/src/getting_started/cdt_w_newcpp.adoc index 97801f3e0e3..e405dd47df7 100644 --- a/doc/org.eclipse.cdt.doc.user/src/getting_started/cdt_w_newcpp.adoc +++ b/doc/org.eclipse.cdt.doc.user/src/getting_started/cdt_w_newcpp.adoc @@ -32,7 +32,7 @@ endif::[] You can begin coding your HelloWorld program. The .cpp file that you create will be saved in the project folder you just created -xref:cdt_w_newproj.adoc[Creating a Makefile project]. +xref:cdt_w_basic.adoc[Creating a Managed Build System Makefile project]. Files are edited in the C/{cpp} editor located to the right of the C/{cpp} Projects view. The left margin of the C/{cpp} editor, called the marker @@ -88,9 +88,9 @@ xref:cdt_w_newmake.adoc[image:ngnext.gif[Next icon,width=16,height=16]] *xref:cdt_w_newmake.adoc[Next: Creating your makefile]* -xref:cdt_w_newproj.adoc[image:ngback.gif[Back -icon,width=16,height=16]] *xref:cdt_w_newproj.adoc[Back: Creating your -project]* +xref:cdt_w_import.adoc[image:ngback.gif[Back +icon,width=16,height=16]] *xref:cdt_w_import.adoc[Back: Importing an +existing project]* image:ngconcepts.gif[Related concepts,width=143,height=21] diff --git a/doc/org.eclipse.cdt.doc.user/src/getting_started/cdt_w_newproj.adoc b/doc/org.eclipse.cdt.doc.user/src/getting_started/cdt_w_newproj.adoc deleted file mode 100644 index bcae2ca3619..00000000000 --- a/doc/org.eclipse.cdt.doc.user/src/getting_started/cdt_w_newproj.adoc +++ /dev/null @@ -1,165 +0,0 @@ -//// -Copyright (c) 2000, 2025 Contributors to the Eclipse Foundation -This program and the accompanying materials -are made available under the terms of the Eclipse Public License 2.0 -which accompanies this distribution, and is available at -https://www.eclipse.org/legal/epl-2.0/ - -SPDX-License-Identifier: EPL-2.0 -//// - -// pull in shared headers, footers, etc -:docinfo: shared - -// support image rendering and table of contents within GitHub -ifdef::env-github[] -:imagesdir: ../../images -:toc: -:toc-placement!: -endif::[] - -// enable support for button, menu and keyboard macros -:experimental: - -// Until ENDOFHEADER the content must match adoc-headers.txt for consistency, -// this is checked by the build in do_generate_asciidoc.sh, which also ensures -// that the checked in html is up to date. -// do_generate_asciidoc.sh can also be used to apply this header to all the -// adoc files. -// ENDOFHEADER - -== Creating a Makefile project - -This tutorial describes the process of creating a new {cpp} project that -includes a makefile, and debugging the program. - -You need to create a project to contain your source code and related -files. A project has an associated builder that can incrementally -compile source files as they are changed. - -To create a project: - -. Select *File > New > Project*. -+ -When you create a new project, you are required to specify the project -type. This project type will determine the toolchain, data, and tabs -that the CDT uses/displays. -+ -. Select the type of project to create. For this tutorial, expand the -*C/{cpp}* folder and select *{cpp} Project*. -+ -The *{cpp} Project* wizard opens. javascript:void(0)[Click here to see an -illustration.] -+ -By default, the CDT filters the *Toolchain* and *Project types* that -currently display in those lists are based on the language support for -the {cpp} Project wizard you selected for this tutorial. -+ -. In the *Project name* field, type HelloWorld. -. Leave the *Use Default Location* option selected. -+ -Next, you want to select the type of project to create. In the New CDT -Project Wizard, you can choose from the following project types: -* *Executable* - Provides an executable application. This project type -folder contains three templates. -** *Hello World {cpp} Example* provides a simple {cpp} Hello World -application with main(). -** *Hello World ANSI C Example* provides a simple C Hello World -application with main(). -** *Empty Project* provides a single source project folder that contains -no files. - + -After you select this template, the result is a project with only the -meta-data files required for the project type. You are expected to -provide source files for the project's target. - + -The makefile for the *Executable* project type is automatically created -by the CDT. - + - -* *Shared Library* - An executable module that is compiled and linked -separately. When you create a project that uses a shared library -(libxx.so), you define your shared library's project as a Project -Reference for your application. For this project type, the CDT combines -object files together and joins them so they're relocatable and can be -shared by many processes. Shared libraries are named using the format -libxx.so.`version`, where `version` is a number with a default of 1. The -libxx.so file usually is a symbolic link to the latest version. The -makefile for this project type is automatically created by the CDT. -* *Static Library* - A collection of object files that you can link into -another application (libxx.a). The CDT combines object files (i.e. *.o) -into an archive (*.a) that is directly linked into an executable. The -makefile for this project type is automatically created by the CDT. -* *Makefile Project* - Creates an empty project without the meta-data -files. This selection is useful for importing and modifying existing -makefile-based projects; a new makefile is not created for this project -type. -+ -By default, the CDT filters the *Toolchain* and *Project types* that -currently display in those lists based on the language support for the -{cpp} Project wizard you selected for this tutorial. -+ - -. From the *Project types* list, expand *Makefile project* and select -*Empty Project*. This project lets you enter the source file and the -makefile yourself. -. Select a required toolchain from the *Toolchain* list. -+ -A toolchain is a set of tools (such as a compiler, linker, and -assembler) intended to build your project. Additional tools, such as a -debugger, can be associated with a toolchain. -There can be several toolchains available, depending on the compilers -installed on your system. -. Click *Next*. -. (Optional) On the *Select Configurations* page, Click *Advanced -Settings*. -* Expand *C/{cpp}Build > Settings*. Click the *Binary Parsers* tab. -+ -javascript:void(0)[Click here to see an illustration.] -+ -* In the *Binary Parser* list, select the error parser that is -appropriate for your platform. Other project settings can be modified -here as well. The default selection is probably OK. -+ -To ensure the accuracy of the C/{cpp} Projects view and the ability to -successfully run and debug your programs, selecting the correct parser -is important. After you select the correct parser for your development -environment and build your project, you can view the components of the -.o file in the C/{cpp} Projects view. You can also view the contents of -the .o file in the C/{cpp} editor. -+ -Click *OK* to close the Project Properties window. -. Click *Finish*. -. If a message box prompts you to change perspectives, click *Yes*. - -Your new project displays in the Project Explorer view. Your project is -empty because you have not yet created files for your project. You may -see an error since there is nothing to build yet for your project. You -can now start writing the code for your HelloWorld program. - -*Tip:* You can view and modify the properties of your HelloWorld project -at any time by right-clicking on the project in the *Project Explorer* -view and clicking Properties. - -xref:cdt_w_newcpp.adoc[image:ngnext.gif[Next -Icon,width=16,height=16]] xref:core_build_system.adoc[*Next: Core Build System*] - -For more information about: - -* Projects, see *Workbench User Guide > Concepts > Workbench > -Resources* -* The workspace, see *Workbench User Guide > Tasks > Upgrading Eclipse* - -image:ngconcepts.gif[Related concepts,width=143,height=21] - -* xref:../concepts/cdt_c_over_cdt.adoc[CDT overview] -* xref:../concepts/cdt_c_projects.adoc[CDT projects] -* xref:../concepts/cdt_c_proj_file_views.adoc[Project file views] - -image:ngtasks.gif[Related tasks,width=143,height=21] - -* xref:../tasks/cdt_o_proj_files.adoc[Working with C/{cpp} project files] - -image:ngref.gif[Related reference,width=143,height=21] - -* xref:../reference/cdt_o_proj_prop_pages.adoc[C/{cpp} Projects view] diff --git a/doc/org.eclipse.cdt.doc.user/src/getting_started/index_cbs.adoc b/doc/org.eclipse.cdt.doc.user/src/getting_started/index_cbs.adoc new file mode 100644 index 00000000000..8318d2e6df3 --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/src/getting_started/index_cbs.adoc @@ -0,0 +1,47 @@ +//// +Copyright (c) 2000, 2025 Contributors to the Eclipse Foundation +This program and the accompanying materials +are made available under the terms of the Eclipse Public License 2.0 +which accompanies this distribution, and is available at +https://www.eclipse.org/legal/epl-2.0/ + +SPDX-License-Identifier: EPL-2.0 +//// + +// pull in shared headers, footers, etc +:docinfo: shared + +// support image rendering and table of contents within GitHub +ifdef::env-github[] +:imagesdir: ../../images +:toc: +:toc-placement!: +endif::[] + +// enable support for button, menu and keyboard macros +:experimental: + +// Until ENDOFHEADER the content must match adoc-headers.txt for consistency, +// this is checked by the build in do_generate_asciidoc.sh, which also ensures +// that the checked in html is up to date. +// do_generate_asciidoc.sh can also be used to apply this header to all the +// adoc files. +// ENDOFHEADER + += Core Build System contents + +xref:core_build_system.adoc[Core Build System] + +xref:new_cmake_proj.adoc[Creating a CMake project] + +xref:new_cbs_makefile_proj.adoc[Creating a Core Build System Makefile project] + +xref:cbs_using_existing_code.adoc[Using existing code] + +xref:cbs_launchbar.adoc[Launch Bar] + +xref:cbs_build_project.adoc[Building a project] + +xref:cbs_run_project.adoc[Running a project] + +xref:cbs_debug_project.adoc[Debugging a project] diff --git a/doc/org.eclipse.cdt.doc.user/src/getting_started/index_mbs.adoc b/doc/org.eclipse.cdt.doc.user/src/getting_started/index_mbs.adoc new file mode 100644 index 00000000000..334ca039ef8 --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/src/getting_started/index_mbs.adoc @@ -0,0 +1,45 @@ +//// +Copyright (c) 2000, 2025 Contributors to the Eclipse Foundation +This program and the accompanying materials +are made available under the terms of the Eclipse Public License 2.0 +which accompanies this distribution, and is available at +https://www.eclipse.org/legal/epl-2.0/ + +SPDX-License-Identifier: EPL-2.0 +//// + +// pull in shared headers, footers, etc +:docinfo: shared + +// support image rendering and table of contents within GitHub +ifdef::env-github[] +:imagesdir: ../../images +:toc: +:toc-placement!: +endif::[] + +// enable support for button, menu and keyboard macros +:experimental: + +// Until ENDOFHEADER the content must match adoc-headers.txt for consistency, +// this is checked by the build in do_generate_asciidoc.sh, which also ensures +// that the checked in html is up to date. +// do_generate_asciidoc.sh can also be used to apply this header to all the +// adoc files. +// ENDOFHEADER + += Legacy Managed Build System contents + +xref:cdt_w_basic.adoc[Tutorial: Creating a Managed Build System Makefile project] + +xref:cdt_w_import.adoc[Tutorial: Importing an existing project] + +xref:cdt_w_newcpp.adoc[Creating your {cpp} file] + +xref:cdt_w_newmake.adoc[Creating a makefile] + +xref:cdt_w_build.adoc[Building a project] + +xref:cdt_w_debug.adoc[Debugging a project] + +xref:cdt_w_existing_code.adoc[Importing your C/{cpp} source files into Eclipse] diff --git a/doc/org.eclipse.cdt.doc.user/src/getting_started/new_cbs_makefile_proj.adoc b/doc/org.eclipse.cdt.doc.user/src/getting_started/new_cbs_makefile_proj.adoc new file mode 100644 index 00000000000..7be8c2aad51 --- /dev/null +++ b/doc/org.eclipse.cdt.doc.user/src/getting_started/new_cbs_makefile_proj.adoc @@ -0,0 +1,73 @@ +//// +Copyright (c) 2000, 2025 Contributors to the Eclipse Foundation +This program and the accompanying materials +are made available under the terms of the Eclipse Public License 2.0 +which accompanies this distribution, and is available at +https://www.eclipse.org/legal/epl-2.0/ + +SPDX-License-Identifier: EPL-2.0 +//// + +// pull in shared headers, footers, etc +:docinfo: shared + +// support image rendering and table of contents within GitHub +ifdef::env-github[] +:imagesdir: ../../images +:toc: +:toc-placement!: +endif::[] + +// enable support for button, menu and keyboard macros +:experimental: + +// Until ENDOFHEADER the content must match adoc-headers.txt for consistency, +// this is checked by the build in do_generate_asciidoc.sh, which also ensures +// that the checked in html is up to date. +// do_generate_asciidoc.sh can also be used to apply this header to all the +// adoc files. +// ENDOFHEADER + +== Creating a Core Build System Makefile project + +This tutorial describes the process of creating a new C/{cpp} project that includes a Makefile file. + +You need to create a project to contain your source code and related files. +A project has an associated builder that can incrementally compile source files as they are changed. + +To create a project: + +. Select menu:File[New > Project]. ++ +When you create a new project, you are required to specify the project type. +This project type will determine the toolchain, data, and tabs that the CDT uses/displays. +. Select the type of project to create. For this tutorial, expand the *C/{cpp}* folder and select *C/{cpp} Project*. +. Click btn:[Next]. + +image:cdt_w_basic03a.png[Select project type] + +The *C/{cpp} Project* wizard opens: + +image:c_cpp_project_wizard.png[width=515] + +By default, the CDT presents all *C/{cpp} Project* templates. + +. Select the *Make* template filter and choose from the *Makefile project* project template. ++ +image:c_cpp_project_wizard_makefile.png[] ++ +. Click btn:[Next]. +. In the *Project name* field, provide a name for the new project. +. Leave the *Use Default Location* option selected. +. Select *Create Hello World Source and Makefile example* to +get a Hello World example application. +. Click btn:[Finish]. +. If a message box prompts you to change perspectives, click btn:[Yes]. + +image:c_cpp_project_wizard_makefile_properties.png[] + +Your new project displays in the Project Explorer view. +Your project may be empty if you did not select the Hello World example creation. +You can now start writing the code for your application or importing code from elsewhere. + +icon:arrow-circle-right[] xref:cbs_using_existing_code.adoc[Next: Using existing code] diff --git a/doc/org.eclipse.cdt.doc.user/src/getting_started/new_cmake_proj.adoc b/doc/org.eclipse.cdt.doc.user/src/getting_started/new_cmake_proj.adoc index 6a302824fd4..a4350d35ed8 100644 --- a/doc/org.eclipse.cdt.doc.user/src/getting_started/new_cmake_proj.adoc +++ b/doc/org.eclipse.cdt.doc.user/src/getting_started/new_cmake_proj.adoc @@ -38,14 +38,13 @@ A project has an associated builder that can incrementally compile source files To create a project: . Select menu:File[New > Project]. - - ++ When you create a new project, you are required to specify the project type. This project type will determine the toolchain, data, and tabs that the CDT uses/displays. - . Select the type of project to create. For this tutorial, expand the *C/{cpp}* folder and select *C/{cpp} Project*. . Click btn:[Next]. +image:cdt_w_basic03a.png[Select project type] The *C/{cpp} Project* wizard opens: @@ -67,8 +66,10 @@ By default, the CDT presents all *C/{cpp} Project* templates. . Click btn:[Finish]. . If a message box prompts you to change perspectives, click btn:[Yes]. +image:c_cpp_project_wizard_cmake_properties.png[] + Your new project displays in the Project Explorer view. Your project may be empty because you have not yet created files for your project. You can now start writing the code for your application or importing code from elsewhere. -icon:arrow-circle-right[] xref:cdt_w_newcpp.adoc[Next: Creating your {cpp} file] +icon:arrow-circle-right[] xref:new_cbs_makefile_proj.adoc[Next: Creating a Makefile project] diff --git a/doc/org.eclipse.cdt.doc.user/topics_Getting_Started.xml b/doc/org.eclipse.cdt.doc.user/topics_Getting_Started.xml index 44e29f99ef1..17aafcdcab6 100644 --- a/doc/org.eclipse.cdt.doc.user/topics_Getting_Started.xml +++ b/doc/org.eclipse.cdt.doc.user/topics_Getting_Started.xml @@ -2,15 +2,24 @@ - - - - - - - - - - + + + + + + + + + + + + + + + + + + +