From 7156f656f6c29a856bcddf35967cd47ce2a6a4d3 Mon Sep 17 00:00:00 2001
From: Vivian Kong For more information about the Tasks view, see Workbench User
Guide > Reference > User interface information > Views and
editors > Tasks view. You can either create a C/C++ project for which you supply the makefile
or create a C/C++ project for which the CDT generates makefiles
automatically. To create a new project, from the menu bar choose File > New
-> Project. In the dialog that appears:Getting a makefile
+
You can set build preferences in Eclipse:
@@ -81,42 +87,47 @@ project.When you set the build order, the CDT does not rebuild projects that depend on a project; you must rebuild all projects to ensure all changes are propagated.
For a Standard Make project, the C/C++ compiler that a project uses +
For a Makefile project, the C/C++ compiler that a project uses is controlled by the project's Properties setting. To view a project's properties, right-click on the project and select Properties. -In the dialog that appears, the C/C++ Standard Make Project +In the dialog that appears, the C/C++ Build page enables you to control a variety of settings, including:
make
is used. To change it, uncheck Use
+ default build command and change it or add arguments to the make command.all
or clean
.For a Managed Make project, the project properties dialog enables +
For a standard (non-Makefile) project (often called "Managed Build" or "Managed Make" project from +earlier CDT version), the project properties dialog enables you to manage the build configurations of your project. For additional information see:
Displaying C/C++ file components in the
-C/C++ Projects view
+Project Explorer view
Searching for C/C++ elements
diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_over_cdt.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_over_cdt.htm
index eece0ba9a2f..c5ebcfe76e3 100644
--- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_over_cdt.htm
+++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_over_cdt.htm
@@ -41,10 +41,10 @@ views:
The Install/Update wizard provides information about your current Eclipse installation and provides the framework to manage your updates. -For more information, see Workbench User Guide > Tasks > Updating features with the update manager.
+For more information, see Workbench User Guide > Tasks > Updating and installing software.To view a list of the updates available for the toolsets that you -installed, click Help > Software Updates > New Updates.
+installed, click Help > Check for Updates.To Open the C/C++ Perspective, select Window > Open Perspective > Other... and select C/C++
Rename in File
+ + +
System Includes
+In older versions of CDT the user was forced to manually set up all include paths that were not discovered by the build system. Now CDT is capable of automatically finding any header file that is located within the project without manual setup. -
(See Bug 213562) -
+
(See Bug 213562)
+
Indexer Accuracy
+There have been significant improvements to the CDT editor for supporting C++ templates. Content assist now works much better within code that makes heavy use of templates.
-
CDT 5.0
+CDT 6.0
The C/C++ Development Toolkit (CDT) is a collection of Eclipse-based features that provides the capability to create, edit, navigate, build, and debug projects that use C and/or C++ as a programming language.
diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_o_tutorial.htm b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_o_tutorial.htm index baa4843d0df..d638f27996c 100644 --- a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_o_tutorial.htm +++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_o_tutorial.htm @@ -14,10 +14,11 @@In this tutorial, you will use the CDT to create a simple 'Hello World' application. This tutorial describes the process of creating a new C++ project where the build is -automatically managed by the CDT.
+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). -With CDT 4.0, you now select a project type, and that determines what build system will be used.
+Now with CDT, you now select a project type, and that determines what build system will be used.To create a simple "Hello World" application using the CDT, you will perform the following steps:
@@ -30,7 +30,7 @@ With CDT 4.0, you now select a project type, and that determines what build systClick here to see an illustration (displayed in a separate window).
Click here to see an illustration.
The C++ Project wizard opens.
By default, the CDT filters the Toolchain and Project types that it displays in those lists based on the language support for the C++ Project wizard you selected for this tutorial.
The make output and build progress information displays in the Console view. The Make Targets view displays makefile actions, and the Tasks view displays compile warnings or errors.
To build a project:
If you see the error message:
-Exec error:Launching failed
-If you see an error message, such as:
+(Cannot run program "make": Launching failed)
then CDT cannot locate the build command, usually make. Either your path is not configured correctly, or you do not have make installed on your system.
+
+Click here to see an illustration (displayed in a separate window)
+.
diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_debug.htm b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_debug.htm
index 8584641ac21..fd94b958153 100644
--- a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_debug.htm
+++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_debug.htm
@@ -18,36 +18,55 @@ examining the contents of variables.
To debug a project:
The Debug Configurations dialog opens.
You can now select this debug launch configuration by name the next time that you debug this project.
-+
You will be prompted to switch to the Debug Perspective. Click Yes
You will now see the debug perspective with the hello.exe application window open. The C/C++ editor repositions in the perspective.
+The breakpoint will be hit.
-The output in the hello.exe application window is:
- "You just entered m, you need to enter m to exit."
To learn more about the debugging, see to the related debug conceptual topics.
+To learn more about debugging, see the related debug conceptual topics.
diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_import.htm b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_import.htm index 11d7b362a12..a0b3d43cb8d 100644 --- a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_import.htm +++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_import.htm @@ -15,47 +15,131 @@ function newWin(url) {The following tutorial takes you though the process of importing a simple application using the CDT.
+The following tutorial takes you though the process of importing a 'legacy' application using the CDT.
-Step 1: You want to create a single project that will reflect all of the components for the existing source tree.
Step 1: You want to create a single project that will reflect all of the components for the existing source tree.
The New Project wizard displays. Click here to see an illustration (displayed in a separate window).
+ The New Project wizard displays.
+ Click
+ here to see an illustration (displayed in a separate window).
In this example, we will use an existing hello.cpp
and its
+ existing hello.mak
makefile, located in the directory c:\brandon
.
+
+ Click + here to see an illustration (displayed in a separate window).
+ + ++ +
You will see the new project in the C/C++ Projects view. In addition, new 'dot' files in your legacy project's root directory, these are CDT project files.
+You will see the new project in the Project Explorer view. In addition, new 'dot' files have been created in + your legacy project's root directory, these are CDT project files.
+Click here to see an + illustration (displayed in a separate window).
+Click here to see an + illustration (displayed in a separate window).
+Click here to see an + illustration (displayed in a separate window).
+Step 2: You are now ready to build your project.
After the project build completes, the results display in the Console view and new objects, such as binaries and includes, show in the Projects view.
+ "make: *** no rule to make target 'all'.
+ This is because, in our case, we didn't tell it where the makefile is, or its name.
+make
command to make -f hello.mak
+ since our makefile is not named the default makefile
.
+ Click + here to see an illustration (displayed in a separate window).
+After the project build completes, the results display in the Console view and new objects, such as binaries and includes, show in the Project Explorer view.
++ Click + here to see an illustration (displayed in a separate window).
Note: By default, the indexer is set to Fast indexer for the project to parse your project in the same way that a compiler does; beginning with each compilation unit and parsing that file and all files that it includes, except that it parses each header file included in a project only once. This method provides the most accurate index information. For large projects using complex C++ code, this indexer can be slow. For example, if a header file is included and takes two compilation units, the parsing of the second unit reuses the results of parsing the first unit. This is similar to how precompiled headers work. The indexing of large projects using the Fast indexer uses fewer resources than the Full indexer, but the resulting index is not quite as accurate.
++
+Note: By default, the indexer is set to Fast indexer for the project to parse your project in the same way that a compiler does; beginning with each compilation unit and parsing that file and all files that it includes, except that it parses each header file included in a project only once. This method provides the most accurate index information. For large projects using complex C++ code, this indexer can be slow. For example, if a header file is included and takes two compilation units, the parsing of the second unit reuses the results of parsing the first unit. This is similar to how precompiled headers work. The indexing of large projects using the Fast indexer uses fewer resources than the Full indexer, but the resulting index is not quite as accurate. +Click here to see an illustration (displayed in a separate window).
Step 3: You are now ready to run your application.
+
The Run Configurations dialog displays.
-In our case it didn't find the file because it's in a nonstandard location.
+Use the Browse button to select the executable. In our case also it's a nonstandard
+name, hello.e
because that's what our makefile hello.mak
built.
Click + here to see an illustration (displayed in a separate window).
+Click + here to see an illustration (displayed in a separate window).
The application runs in the Console view. The Console also shows which application it is currently running in the title bar. You can configure the view to display different elements, such as user input elements using different colors.
You can begin coding your HelloWorld program. The .cpp file that you create will be saved in the project folder you just created -Creating a project.
+Creating a Makefile project.Files are edited in the C/C++ editor located to the right of the C/C++ Projects view. The left margin of the C/C++ editor, called the marker @@ -22,58 +22,50 @@ bar, displays icons for items such as bookmarks, breakpoints, and compiler erro
For more information about:
To create a C++ file:
+#include <iostream> +using namespace std; + +int main () { + // Say Hello five times + for (int index = 0; index < 5; ++index) + cout << "HelloWorld!" << endl; + char input = 'i'; + cout << "To exit, press 'm'" << endl; + while(input != 'm') { + cin >> input; + cout << "You just entered " << input + << " you need to enter m to exit." << endl; + } + exit(0); +} ++ -
-#include <iostream>
-
- using namespace std;
-
- int main () {
- - // Say Hello five times
- - for (int index = 0; index < 5; ++index)
- - cout << "HelloWorld!" << endl;
-
- - char input = 'i';
-
- - cout << "To exit, press 'm'" << endl;
-
- - while(input != 'm') {
- - cin >> input;
- - cout << "You just entered " << input
- << " you need to enter m to exit." << endl;
- - }
-
- - exit(0);
- }
Your new .cpp file is displayed in the C/C++ Projects -view and in the Navigator view. Your project now contains main.cpp. Before you +
Your new .cpp file is displayed in the Project Explorer view. Your project now contains main.cpp. Before you can build your HelloWorld project, you must create a makefile.
diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newmake.htm b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newmake.htm index b437907f5d7..ce562f6a5fe 100644 --- a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newmake.htm +++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newmake.htm @@ -21,9 +21,8 @@ function newWin(url) {
To create a makefile:
Click here to see an illustration (displayed in a separate window).
Your new makefile, along with your main.cpp file are -displayed in the C/C++ Projects view and in the Navigator view. Your project now +displayed in the Project Explorer view. Your project now contains main.cpp and makefile. You can now build your HelloWorld project.
-Click here to see an illustration.
+ + +NEW Click here to see an illustration.
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.
The C++ Project wizard opens. 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 C++ Project wizard you selected for this tutorial.
After you select a template, the result is a project with only the meta-data files required for the project type. You are expected to modify these source files, as required, and provide source files for the project's target.
The makefile for the Executable project type is automatically created by the CDT.
+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.
+
By default, the CDT filters the Toolchain and Project types that currently display in those lists based on the language support for the C++ Project wizard you selected for this tutorial. -
+
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 here to see an illustration.
To ensure the accuracy of the C/C++ 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/C++ Projects view. You can also view the contents of the .o file in the C/C++ editor. +
Click OK to close the Project Properties window. +Your new project displays in the C/C++ Projects view, and in -the Navigator view. Your project is empty because you have not yet created -files for your project. You can now start writing the code for your HelloWorld +
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 by right-clicking on the project in the C/C++ Projects +HelloWorld project at any time by right-clicking on the project in the Project Explorer view and clicking Properties.
For more information
diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt_w_bin.png b/doc/org.eclipse.cdt.doc.user/images/cdt_w_bin.png
new file mode 100644
index 0000000000000000000000000000000000000000..1d4df052575a4d39a60750aceba543beea91ac36
GIT binary patch
literal 31206
zcmeI3Wl$VX80HrXiv%aQ1cGZIxVsaAyGw9)x8Uv&AP_9LyF<_bL4!NN-Tj9A@9x{(
z=c}uwrfO<;W@oy8Ezk45-GD%lKL`N`0SEyI0SEyI0SEyI0SEyI0SEyI0SEyIf&bqL
zWO00c778E*uXnEU55g$O(c#n~_ N9dWn~uj!T9TS6p 7%3PrU`>}M9aDh~X^HnmJ^+-Fm9tnE
z2Aj`~x2NT~=mjw0&3mE&G>Z1k2aPfiR0rFsdO6jz*+T}y=yhhEv5ZaYvknrgG{S@H
z4YOT#Er{!)E1)bQBDR**{n>a&&m?8f;Y$Zz(2bhZa`kpvvCJ@SC)CJsM{^Bfj}Y;6
zZB$&_+_q2Q7t7R&SJU8`Ml &o#bAKA
zyA9G4JU%vRC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