<p>To create a simple "Hello World" application using the CDT, you will perform the following steps:</p>
<h3> Step 1: Creating a project</h3>
<ol>
<li>Select <b>File > New > Project</b>.</p>
<p><br><ahref="javascript:void(0)"onClick="newWin('../images/cdt_w_basic20.png')">Click here to see an illustration (displayed in a separate window)</a>.</p><br></li>
<li>Select the type of project to create. For this tutorial, expand the <b>C++</b> folder and select <b>C++ Project</b>.
<p><br>The <b>C++ Project</b> wizard opens. <ahref="javascript:void(0)"onClick="newWin('../images/cdt_w_basic19.png')">Click here to see an illustration.</a><br></p>
<p><br>By default, the CDT filters the <b>Toolchain</b> and <b>Project types</b> that currently display in those lists are based on the language support for the C++ Project wizard you selected for this tutorial.
<li>In the <b>Project name</b> field, type a name for the project.
<li>From the <b>Project types</b> list, expand <b>Executable</b> and select <b>Hello World C++ Example</b>. This project type provides a simple Hello World application in C++, and the makefile is automatically created by the CDT.
<li>Select a required toolchain from the <b>Toolchain</b> list.
<p>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.<br>
There can be several toolchains available, depending on the compilers installed on your system.
</p>
<li>Optional: If you want to change these default settings, click <b>Advanced Settings</b> at Step 10instead of clicking <b>Finish</b>.
<p>If the <b>C++ perspective</b> is not currectly set as the default, you are prompted to determined if you would like to this project to be associated with the C/C++ perspective. Click <b>Yes</b>. <br><ahref="javascript:void(0)"onClick="newWin('../images/cdt_w_cpp_perspectx.png')">Click here to see an illustration.</a></p><br>
<p>A project is created with the default settings and a full set of configurations based on the project type and toolchain you selected.</p>
<li>If you clicked <b>Next</b> at Step 7, you can specify the basic properties for the new project, such as your name, copyright, and source information.</p><br>
<p><ahref="javascript:void(0)"onClick="newWin('../images/cdt_w_basic15.png')">Click here to see an illustration.</a></p><br>
<li>Click <b>Next</b>.
<p>The Select Configurations window displays a list of configurations based on the project type and toolchain(s) you selected earlier. <br><ahref="javascript:void(0)"onClick="newWin('../images/cdt_w_basic14.png')">Click here to see an illustration.</a></p><br>
<li>Click <b>Finish</b>.
<p>You should now see the new project in C/C++ Projects view.</p>
<p>If C/C++ perspective was not set as current before, it will be selected now.</p>
You can double click the <b>main.cpp</b> tab in the <b>Editor</b>
view to expand the view. <br>
<i>Note: Leave a blank line at the end of the code because it is required by some compilers.</i></p>
<p>On the tab in the <b>Editor</b> view, an asterisk character ("*") prefixes the file name. The asterisk indicates that the file has changed but has not been saved.</p>
<li>Notice that the <b>Outline</b> view has also been populated
with objects created from your code. </p>
<p>If you select an item from the <b>Outline</b> view, the
corresponding text in the editor is highlighted.
<li>Save the main.cpp file by clicking <span
style="font-weight: bold;">File > Save</span> or pressing <b>CTRL+S</b>.
<li>Build your project by pressing <b>CTRL+B</b>.</p>
<p>You can read through the build messages in the <b>Console</b> view.
The project should build successfully, showing the following message:</p>
<p><tt>Finished building target: HelloWorld.exe</tt></p>
<br>
<p>You will also see the <b>Outline</b> view has also been populated
with objects created from your code. </p>
<p>If you select an item from the <b>Outline</b> view, the
corresponding text in the editor is highlighted.</p></li>
</ol>
<h3>Step 4: Running the application</h3>
<ol>
<li>To run your application within the C/C++ Perspective, click <b>Run > Run...</b>
<li>Select <b>C/C++ Local Application</b>.
<li>Click <b>'New'</b>.
<li>Click <b>'New'</b>.</p>
<p>A new Run Configuration is created. Its name and path to executable are provided by the project ('HelloWorld' in our case).
<li>Click <b>'Run'</b>.
</ol>
<h3>Step 5: Reviewing and interpreting the results in the Console view</h3>
<p>Now, you should now see the Hello World application running in the <b>Console</b> view.
The <b>Console</b> also shows which application is running in a title bar.
You can configure this view to display different elements (such as user input elements) using different colors.</p>
<ol>
<li>Type in your name and press Enter.
<p>The title bar in the <b>Console</b> view shows you when the program has terminated.</p>
<li>You can click the other views to see the information that they contain.