Skip to main content
summaryrefslogtreecommitdiffstats
blob: 83b082b762de9d2ba5f4e200bb20b173828a0368 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
	<meta http-equiv="Content-Language" content="en-us">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>CDT Importing an Existing Managed Make Project Tutorial</title>
	<link rel="stylesheet" type="text/css" href="../help.css">

<script language="JavaScript">
function newWin(url) {
	window.open(url, 'install_cdt', 'width=750, height=700, menubar=no, toolbar=no, status=no, resizable=yes, location=no, scrollbars=yes');
}
</script>
</head>
<body>
<h2>Turorial: Importing an existing project</h2>

<p>The following tutorial will walk you though the process of importing a simple application using the CDT.</p>


<p>Step 1: You want to create a single project that will reflect all of the components for the existing source tree.<br></p> 
<ol>
	<li>Select <b>File &gt; New &gt; Project</b>.
	<li>For this tutorial, expand <b>C++</b> and select <b>C++ project</b>.
	<p><br>The <b>New Project</b> wizard dispalys. <a href="javascript:void(0)" onClick="newWin('../images/cdt_w_import02.png')">Click here to see an illustration (displayed in a separate window)</a>.</p> <br>


	<li>In the <b>Project name</b> field, type a name for the project.
	<li>Ensure that the <b>Use default location</b> option is not selected because you will need to specify where the resources reside in the file system since they do not reside in your workspace.
	<li>In the <b>Location</b> field, specify the path for your project. For this tutorial, the project to import is assumed to reside in the directory C:\MySrcDirectory.
	<li>From the <b>Project types</b> list, expand <b>Makefile Project</b> and select <b>Hello World C++ Project</b>.
	<li>Click <b>Next</b>.
	<li>Select only the configurations you want created. Configurations display for each toolchain selected on the previous page of the wizard.
	<li>Click <b>Finish</b> to close the dialog box.
<p>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.</p>
</ol>

<p>Step 2: You are now ready to build your project.<br></p>
<ol>
	<li>To build your project, select <b>File</b> &gt; <b>Build Project</b>.
<p>After the project build completes, the results display in the <b>Console</b> view and new objects, such as binaries and includes, show in the <b>Projects</b> view.</p>
	<li>Review the results to ensure that there are no errors.

<p><b>Note:</b> By default, the indexer is set to <b>Fast indexer</b> 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.</p>
</ol>

<p>Step 3: You are now ready to run your application.</p>
<ol>
	<li>To run your application within the C/C++ Perspective, click <b>Run &gt; Run</b><p>
	    <p>The <b>Run Configurations</b> dialog displays.</p>
	<li>To create a run configuration, select <b>Local C/C++ Application</b> and click <b>OK</b>.  
<li>Select the new run configuration in the <b>Configurations</b> view and click the <b>Main</b> tab to edit your run configuration.
<li>Optional: You can change the name of your run configuration by entering a new name in the <b>Name</b> field.
<li>To select the project, click <b>Browse</b> opposite the <b>Project</b> field.  
<li>From the Project Selection window, select the project and click <b>OK</b>.
<li>Select the new <b>C/C++ Application</b> you want to execute by clicking <b>Search</b>.
<li>From the Program Selection window, select an appropriate binary from the list and click <b>OK</b>.
<li>Click <b>Apply</b> to save the run configuration and then click <b>Run</b>.
<p>The application runs in the <b>Console</b> view. The <b>Console</b> 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.</p>
</ol>
<img src="../images/ng00_04a.gif" ALT="QNX Copyright Statement" >
</body>
</html>

Back to the top