2007-04-29 19:14:36 +00:00
<?xml version="1.0" encoding="UTF-8"?>
2007-05-31 19:24:25 +00:00
2007-05-15 17:21:24 +00:00
<cheatsheet title= "Creating C/C++ projects" >
2007-04-29 19:14:36 +00:00
<intro href= "/org.eclipse.cdt.doc.user/concepts/cdt_c_projects.htm" >
<description >
2007-05-15 17:21:24 +00:00
This guide will walk you though the process of creating a simple " Hello World" C/C++ application using the CDT.
2007-04-29 19:14:36 +00:00
</description>
</intro>
<item title= "C/C++ workbench setup" dialog= "false" skip= "false" href= "/org.eclipse.cdt.doc.user/concepts/cdt_c_perspectives.htm" >
<description >
Start by setting up the CDT development environment.
</description>
<subitem label= "Open C/C++ perspective." skip= "true" >
<command serialization= "org.eclipse.ui.perspectives.showPerspective(org.eclipse.ui.perspectives.showPerspective.perspectiveId=org.eclipse.cdt.ui.CPerspective)" confirm= "false" >
</command>
</subitem>
</item>
<item title= "Creating a C/C++ project" dialog= "true" skip= "false" href= "/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz.htm" >
<description >
2007-05-15 17:21:24 +00:00
Create a C++ or C project by choosing one of the following wizards.
2007-04-29 19:14:36 +00:00
</description>
2007-05-15 17:21:24 +00:00
<subitem label= "Click File > New > C++ Project to launch the new C++ project wizard." skip= "true" >
<command serialization= "org.eclipse.ui.newWizard(newWizardId=org.eclipse.cdt.ui.wizards.NewCWizard1)" confirm= "false" >
2007-04-29 19:14:36 +00:00
</command>
</subitem>
2007-05-15 17:21:24 +00:00
<subitem label= "Click File > New > C Project to launch the new C project wizard." skip= "true" >
<command serialization= "org.eclipse.ui.newWizard(newWizardId=org.eclipse.cdt.ui.wizards.NewCWizard2)" confirm= "false" >
2007-04-29 19:14:36 +00:00
</command>
</subitem>
2007-05-15 17:21:24 +00:00
<subitem label= "Choose Executable > Hello World C/C++ Example from the Project types list." skip= "false" >
2007-04-29 19:14:36 +00:00
</subitem>
2007-05-15 17:21:24 +00:00
<subitem label= "Type a project name, set its location, and select a Toolchain, then click Next." skip= "false" >
2007-04-29 19:14:36 +00:00
</subitem>
2007-05-15 17:21:24 +00:00
<subitem label= "Enter Basic Project information, then click Next." skip= "true" >
2007-04-29 19:14:36 +00:00
</subitem>
2007-05-15 17:21:24 +00:00
<subitem label= "Select platforms and configurations to show in the Run/Debug menus, click Finish." skip= "true" >
2007-04-29 19:14:36 +00:00
</subitem>
</item>
<item title= "Building projects and inspecting files" dialog= "true" skip= "false" href= "/org.eclipse.cdt.doc.user/tasks/cdt_o_build_task.htm" >
<description >
2007-05-31 19:24:25 +00:00
Build the program to create a binary and examine it in Project Explorer and Outline views.
2007-04-29 19:14:36 +00:00
</description>
<subitem label= "Click Project > Build All to create a binary of your source file." skip= "true" >
2007-05-31 19:24:25 +00:00
<!--
2007-04-29 19:14:36 +00:00
<command serialization= "org.eclipse.ui.project.buildAll" confirm= "false" >
</command>
2007-05-31 19:24:25 +00:00
-->
2007-04-29 19:14:36 +00:00
</subitem>
2007-05-15 17:21:24 +00:00
<subitem label= "In the Project Explorer view, open the Binaries element and examine the program's binary." skip= "true" >
</subitem>
<subitem label= "Open the .cpp file in the project and examine the Outline view." skip= "true" >
2007-05-31 19:24:25 +00:00
<command serialization= "org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.cdt.ui.edit.open.outline)" confirm= "false" >
2007-04-29 19:14:36 +00:00
</command>
2007-05-31 19:24:25 +00:00
<!--
<command serialization= "org.eclipse.cdt.ui.edit.open.outline" confirm= "false" >
</command>
-->
2007-04-29 19:14:36 +00:00
</subitem>
</item>
<item title= "Running the program" dialog= "true" skip= "false" href= "/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_main.htm" >
<description >
The final step is to create a run configuration that defines how the program is launched. Note you can define multiple run configurations if desired, each with its own settings.
</description>
2007-05-31 19:24:25 +00:00
<subitem label= "Select the project and click Run As > Open Run Dialog... to launch the program." skip= "false" >
<!--
2007-04-29 19:14:36 +00:00
<command serialization= "org.eclipse.debug.ui.commands.OpenRunConfigurations" confirm= "false" >
</command>
2007-05-31 19:24:25 +00:00
-->
2007-04-29 19:14:36 +00:00
</subitem>
2007-05-15 17:21:24 +00:00
<subitem label= "Create a run configuration by double-clicking the C/C++ Local Application item." skip= "false" >
2007-04-29 19:14:36 +00:00
</subitem>
2007-05-15 17:21:24 +00:00
<subitem label= "Type a configuration name in the Name box." skip= "true" >
2007-04-29 19:14:36 +00:00
</subitem>
2007-05-15 17:21:24 +00:00
<subitem label= "If no binary name appears in the C/C++ Application box, click Search Project to select one in the Program Selection dialog." skip= "true" >
2007-04-29 19:14:36 +00:00
</subitem>
<subitem label= "Click Apply, then click Run to launch the program. The Console view displays the program output." skip= "true" >
2007-05-15 17:21:24 +00:00
<command serialization= "org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.ui.views.ContentOutline)" confirm= "false" >
2007-04-29 19:14:36 +00:00
</command>
</subitem>
</item>
</cheatsheet>