| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> |
| <html lang="en"> |
| |
| <head> |
| <meta http-equiv="Content-Language" content="en-us"> |
| <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> |
| <meta name="ProgId" content="FrontPage.Editor.Document"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>CDT projects</title> |
| <link rel="stylesheet" type="text/css" href="../help.css"> |
| </head> |
| |
| <body> |
| |
| <h1>CDT projects</h1> |
| |
| <p>Before you do any work in the CDT, you must create a project to store your |
| source code, makefiles, binaries and related files. C/C++ projects are displayed |
| in the C/C++ Projects view.</p> |
| |
| <p><b>Tip:</b> Nested projects are not supported. Each project must be organized as a |
| discrete entity. Project dependencies are supported by allowing a project |
| to reference other projects that reside in your workspace. For more information, |
| see <a href="../tasks/cdt_t_proj_ref.htm">Selecting referenced projects</a>.</p> |
| |
| <p>For more information about projects and where they are stored, see:</p> |
| |
| <ul> |
| <li> <b>Workbench User Guide > Tasks > Resources</b></li> |
| <li> <b>Workbench User Guide > Tasks > Running Eclipse</b></li> |
| </ul> |
| |
| <h2>Project types</h2> |
| |
| <p>You can create a standard make C or C++ project or a managed make C or C++ |
| project.</p> |
| |
| <h3>Standard Make C or C++ project</h3> |
| |
| <p>You need to create a makefile in order to build your project or use an |
| existing makefile.</p> |
| |
| <h3>Managed Make C or C++ project</h3> |
| |
| <p>A managed make project generates the makefile for you. In addition, the |
| files module.dep and module.mk are created for every project sub-directory. |
| These files are required for your managed make project to successfully build.</p> |
| |
| <h3>How the CDT associates project natures</h3> |
| |
| <p>Projects are assigned natures and tags that identify the |
| properties of each project. The CDT uses natures to identify what can and cannot be done with each project. The |
| CDT also uses natures to filter out projects that are contextually |
| irrelevant; for example, non-library projects from a list of library projects.</p> |
| |
| <table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="56%"> |
| <tr> |
| <th align="left" width="63%">Project</td> |
| <th align="left" width="37%">Associated natures</td> |
| </tr> |
| <tr> |
| <td width="63%">Standard Make C Project</td> |
| <td width="37%">C, make</td> |
| </tr> |
| <tr> |
| <td width="63%">Managed Make C Project</td> |
| <td width="37%">C, gen make</td> |
| </tr> |
| <tr> |
| <td width="63%">Standard Make C++ Project</td> |
| <td width="37%">C, C++</td> |
| </tr> |
| <tr> |
| <td width="63%">Managed Make C++ Project</td> |
| <td width="37%">C, C++</td> |
| </tr> |
| </table> |
| |
| <h2>Project conversion</h2> |
| |
| <p>You can convert a C project to a C++ project and vice versa. An example of |
| when this may be useful is if you create a C project, your requirements change during the course of |
| the development, and you |
| need to continue coding in C++. Since the initial project was coded in C, |
| the parser will not recognize certain semantics such as "class", or keywords |
| such as |
| "public", "private", and "template". You need to create a C++ project to |
| make the parser and other tools aware of the language change. You can simply |
| convert your C project to a C++ project rather than creating a new C++ project, copying your project files over and resolving source control issues.</p> |
| |
| <h2>A few notes about projects</h2> |
| |
| <ul> |
| <li>When you create a file within a project, a record (local |
| history) is created of every time that you modify the file and how you modify it. |
| For more information about local history, see <b>Workbench User Guide > Reference > User interface |
| information > Development environment > Local history</b>.</li> |
| <li>Spaces in projects and filenames can cause problems with some |
| tools, such as the make utility or the compiler.</li> |
| <li>Be careful when using case alone to between distinguish files and projects. UNIX-based |
| operating system |
| filenames are case-sensitive, but Windows filenames are not. Therefore, Hello.c and |
| hello.c overwrite each other in Windows, but are separate files in UNIX.</li> |
| </ul> |
| |
| |
| <p>For more information about projects, see <b>Workbench User Guide > Concepts > Workbench > Resources</b>.</p> |
| |
| |
| <p><img border="0" src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21"> |
| <br> |
| <a href="cdt_c_proj_file_views.htm">Project file views</a><br> |
| <a href="../getting_started/cdt_w_existing_code.htm">How to bring C/C++ source into Eclipse</a></p> |
| <p><img border="0" src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21"> |
| <br> |
| <a href="../tasks/cdt_o_proj_prop.htm">Defining project properties</a><br> |
| <a href="../tasks/cdt_o_proj_files.htm">Working with C/C++ project files</a></p> |
| <p><img border="0" src="../images/ngref.gif" ALT="Related reference" width="143" height="21"> |
| <br> |
| <a href="../reference/cdt_o_proj_prop_pages.htm">Project properties</a><br> |
| <a href="../reference/cdt_o_views.htm">Views</a></p> |
| |
| |
| <img src="../images/ng03_04.gif" ALT="IBM Copyright Statement" BORDER=0 width="324" height="14"> |
| |
| </body> |
| |
| </html> |