Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: cb364e3f12b613de0c613275198e6f264ed71704 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.ord/TR/html4/loose.dtd">
<html>

<head>

<title>Common Wizards</title>

</head>
<body bgcolor="#ffffff" text="#000000">
<hr>


<h1><a name="id1">Common Wizards</a></h1>

<p>

 </p>
<p></p>
In this chapter:
<ul>
<li><a href="#how">Introduction</a>
   </li>
<li><a href="#c">Creating a C/C++ Project (New Project wizard)</a>
   </li>
<li><a href="#convert">Converting projects (Convert to a QNX Project wizard)</a></li>
</ul>
<p></p>

<h1><a name="how">Introduction</a></h1>

<p>Wizards guide you through a sequenced set of tasks. In the IDE, these tasks may 
be creating something new (e.g. a project) or converting one thing to another 
(e.g. converting to a Standard C project). Most often, you use wizards to create 
new projects and folders.</p>
<p>

Wizards aren't directly connected to any perspective, though you're more likely to call them from some perspectives than from others (most likely from the <b>C/C++ Development</b> perspective).</p>
<p>You can access all the wizards from the main menu by selecting <b>File</b>--><b>New</b>. The <b>File</b>--><b>New</b>--><b>Project</b> selection filters out all the wizards except projects; <b>File</b>--><b>New</b>--><b>Other</b> doesn't filter anything. (The exception to this is <b>Target System Project</b>, which, while labeled as a project, isn't a project as far as the IDE is concerned.)</p>
<p>In the <b>New Project</b> dialog, the wizards are further sorted: selecting <b>C</b> in the left pane displays all the projects with a C nature in the IDE; selecting <b>QNX</b> in the left pane shows all the projects with a QNX nature:</p>
<p><img src="./images/cwiz.jpg" alt="Common wizards dialog"></p>
<p> Notice the overlap: the <b>QNX C Application Project</b> wizard appears in the right pane for both <b>C</b> and <b>QNX</b>.</p>
<p>

So-called "simple" wizards show the very basic elements of projects: <b>Project</b>, <b>Folder</b>, and <b>File</b>. These elements have no natures associated with them. You can access the wizards for these by selecting <b>File</b>--><b>New</b>--><b>Other</b>, then selecting <b>Simple</b> from the left pane.</p>
<p></p>

<hr>
<table>
<tr><td valign="top"><img src="image-lib/pointing.gif" alt="Note:"></td>
<td><p>Although projects may appear as directories in your workspace, the IDE attaches special meaning to them. The IDE won't automatically recognize a directory you create in your <tt>workspace</tt> directory as a project.</p><p>

The IDE automatically recognizes directories and new files of any type if you create them outside of the IDE (i.e. using Windows Explorer) and place them in a project directory. To have the IDE recognize them, in the <b>Navigator</b> view, right-click the navigator pane and select <b>Refresh</b>. </p></td></tr>
</table>
<hr>



<h1><a name="c">Creating a C/C++ project (New Project wizard)</a></h1>

<p>The <b>New Project</b> wizard helps you create a C or C++ project.</p>
<p>This section includes:</p>
<ul>
<li><a href="#c_types">Types of projects</a>
	</li>
<li><a href="#c_creating">Creating your C/C++ Project (New Projects wizard)</a>
	</li>
<li><a href="#c_tabs">New C/C++ Project wizard tabs</a>	</li>
</ul>

<h2><a name="c_types">Types of projects</a></h2>

<p>The IDE lets you create a variety of projects, each with certain properties. Most of these projects are also subdivided into C or C++ projects:

</p>
<dl>

<dt><b>Standard Make C Project</b><br><b>Standard Make C++ Project</b>
	</dt>
<dd>A basic C or C++ project that uses a standard <tt>makefile</tt> and GNU <tt>make</tt> to build the source files. You don't get the added functionality provided by the QNX build organization and the <tt>common.mk</tt> file. 

</dd>
</dl>

<h2><a name="c_creating">Creating your C/C++ project (New Projects wizard)</a></h2>

<p>To create a C/C++ project :

</p>
<ol>

<li>From the menu, select <b>File</b>--><b>New</b>--><b>Project</b>.
The <b>New</b> dialog appears. Projects are filtered by the natures listed in the left pane.
    </li>
<li>In the left pane, select the nature in the table:<p></p><table border=1 width="100%">

<tr>
<th>If you want to build:
	</th>
<th>Select:</th>
</tr>
<tr>
<td><b>Standard Make C Application Project</b>
	</td>
<td><b>C</b></td>
</tr>
<tr>
<td><b>QNX C Application Project</b>
	</td>
<td><b>C</b> or <b>QNX</b></td>
</tr>
<tr>
<td><b>QNX C Library Project</b>
	</td>
<td><b>C</b> or <b>QNX</b></td>
</tr>
<tr>
<td><b>Standard Make C++ Application Project</b>
	</td>
<td><b>C++</b></td>
</tr>
<tr>
<td><b>QNX C++ Application Project</b>
	</td>
<td><b>C++</b> or <b>QNX</b></td>
</tr>
<tr>
<td><b>QNX C++ Library Project</b>
	</td>
<td><b>C++</b> or <b>QNX</b></td>
</tr>
</table>


    </li>
<li>In the right pane, select the type of project that you want (e.g. <b>QNX C Application Project</b>).
    </li>
<li>Click <b>Next</b>.
    </li>
<li>Type a name for your project in the <b>Name</b> field.
    </li>
<li>Ensure that <b>Use Default Location</b> is checked. Don't use a different location.
    </li>
<li>Click <b>Next</b>.
	The wizard displays the appropriate tabs.
    </li>
<li>Select each tab and fill in the required information. The fields for each tab are described in the <a href="#c_tabs">"New C/C++ Project wizard tabs"</a> section, below.
    </li>
<li>Click <b>Finish</b>.
The IDE creates your new project in your workspace. </li>
</ol>


<hr>
<table>
<tr><td valign="top"><img src="image-lib/pointing.gif" alt="Note:"></td>
<td>In the <b>C/C++ Development</b> perspective, you can also access the <b>QNX C/C++ Projects</b> with the 
<img src="./images/icon_newccqnx_lib.gif" alt="Icon: QNX C++ Library Project"> &nbsp;
<img src="./images/icon_newcqnx_lib.gif" alt="Icon: QNX C Library Project">&nbsp;
<img src="./images/icon_newccqnx_app.gif" alt="Icon: QNX C++ Application Project">&nbsp;
<img src="./images/icon_newcqnx_app.gif" alt="Icon: QNX C Application Project">&nbsp;
 buttons.
 </td></tr>
</table>
<hr>



<h2><a name="c_tabs">New C/C++ Project wizard tabs</a></h2>

<p>Depending on the type of project you choose, the <b>New Project</b> wizard displays different tabs:

</p>
<table border=1 width="100%">

<tr>
<th>Project Type
	</th>
<th>Architecture tab,<br>Options tab	
	</th>
<th>Projects tab,<br>Build Settings tab	
	</th>
<th>Library tab

</th>
</tr>
<tr>
<td><b>Standard Make C Project</b> or<br><b>Standard Make C++ Project</b>
	</td>
<td>Yes	
	</td>
<td>No
	</td>
<td>No

</td>
</tr>
<tr>
<td><b>QNX C Application Project</b> or<br><b>QNX C++ Application Project</b>
	</td>
<td>Yes
	</td>
<td>Yes	
	</td>
<td>No

</td>
</tr>
<tr>
<td><b>QNX C Library Project</b> or<br><b>QNX C++ Library Project</b>
	</td>
<td>Yes
	</td>
<td>Yes
	</td>
<td>Yes

</td>
</tr>
</table>


<hr>
<table>
<tr><td valign="top"><img src="image-lib/pointing.gif" alt="Note:"></td>
<td> You can find the default settings for the <b>New Project</b> wizard by selecting <b>Window</b>--><b>Preferences</b> from the main menu. From the left pane, select <b>C/C++</b>, then <b>New QNX Projects</b>.</td></tr>
</table>
<hr>



<h3><a name="id8">Architecture tab</a></h3>

<p>The <b>Architecture</b> tab lets you choose the platforms to compile executables for:</p>
<p><img src="./images/cwiz_c_architecture.jpg" alt="Common wizards: C/C++ Projects; Architecture tab"></p>
<p>For example, to build for a PowerPC platform, enable <b>PPC (Big Endian)</b>.</p>
<p>

If you've already created a <b>QNX Target System Project</b>, you'll also see entries such as <b>Doug [localhost - x 86]</b>. These let you build specifically for a configured target. If you also enable <b>X86 (Little Endian)</b>, the IDE builds only one executable, not two.</p>
<p>

You must choose at least one platform.

</p>

<h3><a name="id10">Projects tab</a></h3>

<p>The <b>Projects</b> tab lets you configure your preferred order of building:</p>
<p><img src="./images/cwiz_c_projects.jpg" alt="Common wizards: C/C++ Projects; Projects tab"></p>
<p>For example, if you associate <i>myProject</i> with <i>mySubProject</i>, the IDE builds <i>mySubProject</i> first during rebuilds. If you change <i>mySubProject</i>, the IDE doesn't automatically rebuild <i>myProject</i>.


</p>

<h3><a name="id12">Build Settings tab</a></h3>

<p>The <b>Build Settings</b> tab lets you configure how the IDE handles <tt>make</tt> errors and what command to use to build your project:</p>
<p><img src="./images/cwiz_c_buildsettings.jpg" alt="Common wizards: C/C++ Projects; Build Settings tab ">


</p>
<dl>

<dt><b>Build Settings</b></dt>
<dd>If you want the IDE to stop building when it encounters a <tt>make</tt> error, enable <b>Stop on Error</b>. Otherwise, enable <b>Keep Going On Error</b>.

</dd>
<dt><b>Build Command</b></dt>
<dd>If you want the IDE to use the default <tt>make</tt> command, enable <b>Use Default</b>. If you want to use a different utility to build your project, disable <b>Use Default</b> and enter your own command in the <b>Build Command</b> field (e.g. <tt>C:\<i>myCustomizedMakeProgram</i></tt>).

</dd>
</dl>


<h3><a name="id14">Options tab</a></h3>

<p>The <b>Options</b> tab lets you choose what type of executables the IDE builds:</p>
<p><img src="./images/cwiz_c_options.jpg" alt="Common wizards: C/C++ Projects; Options tab">

</p>
<dl>

<dt><b>Build Type</b></dt>
<dd>To build a regular executable, enable <b>Build release version</b>. To build a debuggable executable, enable <b>Build debug version</b> (debug versions have <tt>_g</tt> appended to their filename).
<p>

You must select at least one build type.


</p></dd>
<dt><b>Build Options</b></dt>
<dd>To fully enable profiling with the <b>QNX Application Profiler</b> perspective, enable <b>Build with Profiling</b>. The IDE adds profiling code to all the versions selected in <b>Build Types</b>. See the <a href="prof.html">Profiling Your Application</a> chapter.</dd>
</dl>


<h3><a name="id16">Library tab</a></h3>

<p>The <b>Library</b> tab lets you choose the type of library you wish to build (e.g. <b>Static library</b>, <b>Shared library</b>):</p>
<p><img src="./images/cwiz_c_library.jpg" alt="Common wizards: C/C++ Projects; Library tab"></p>
<dl>

<dt>Static library (<tt>libxx.a</tt>)
	</dt>
<dd>Combine binary object files (i.e. <tt>*.o</tt>) into an archive that will later be directly linked into an executable.

	</dd>
<dt>Shared library (<tt>libxx.so</tt>)
	</dt>
<dd>Combine binary objects together and join them so they are relocatable and can be shared by many processes. Shared libraries are named using the format <tt>libxx.so.</tt><i>version</i>, where <i>version</i> is a number with a default of 1. The <tt>libxx.so</tt> file symlinks to the latest version.
	
	</dd>
<dt>Static library for shared objects (<tt>libxxS.a</tt>)
	</dt>
<dd>Same as static library, but using position-independent code (PIC). Use this for a library that will later be linked into a shared object. The System Builder uses these types of libraries to create new shared libraries that contain only the symbols that are absolutely required by a specific set of programs.
		
	</dd>
<dt>Shared library without export (<tt>xx.so</tt>)
	</dt>
<dd>A shared library without versioning. Generally, you manually open the library with the <a href="../../neutrino/lib_ref/d/dlopen.html"><i>dlopen()</i></a> function and look up specific functions with the <a href="../../neutrino/lib_ref/d/dlsym.html"><i>dlsym()</i></a> function.</dd>
</dl>

<p>You must choose one of the options.


 </p>

<h1><a name="target">Creating a target (New Target System Project wizard)</a></h1>

<p>You must create a <b>Target System Project</b> for every target you have. When you create a launch configuration, you have the option of adding a new target from within the <b>Launch Configurations</b> dialog. When you do, the IDE opens up the <b>New Target System Project</b> wizard.</p>
<p>

To create a new target:</p>
<ol>

<li>From the menu, select <b>File</b>--><b>New</b>--><b>Other</b>.
   </li>
<li>In the left pane, select <b>QNX</b>.
   </li>
<li>In the right pane, select <b>QNX Target System Project</b>.
   </li>
<li>Click <b>Next</b>.
   The <b>New QNX Target System Project</b> wizard appears:<p> 
   <img src="./images/cwiz_target.jpg" alt="Common wizards: New Target System Project">
   </p></li>
<li>Fill in the fields described below:
   <dl>

<dt><b>Target Name</b>
		</dt>
<dd>Type a descriptive name for your <b>QNX Target System Project</b>.

		</dd>
<dt><b>Project contents</b>
		</dt>
<dd>Enable <b>Use default</b> to store it in your workspace, or disable it and select another location in the <b>Directory</b> field.

		</dd>
<dt><b>QNX Connector Selection</b>
		</dt>
<dd>Type the target connection in the <b>Hostname or IP</b> and <b>Port</b> fields. If you're running the IDE on a QNX Neutrino machine running <tt>qconn</tt>, make sure <b>Use local QNX Connector</b> is enabled; the IDE automatically fills in the connection information. (If you wish to connect to a different target, you may disable <b>Use local QNX Connector</b> and fill in the fields manually.)

		</dd>
<dt><b>Target Configuration</b>
		</dt>
<dd>This section is for a future feature.
	</dd>
</dl>


   
   </li>
<li>Click <b>Finish</b>.
   Your new <b>QNX Target System Project</b> appears in the <b>Navigator</b> view. When you create a <b>Launch Configuration</b>, the target is listed under the <b>Main</b> tab in the <b>Target Options</b> pane. 


<hr>
<table>
<tr><td valign="top"><img src="image-lib/pointing.gif" alt="Note:"></td>
<td>You can also reach the <b>New Target System Project</b> wizard by right-clicking in the <b>Target Options</b> pane and selecting <b>Add target</b>.</td></tr>
</table>
<hr>


   </li>
</ol>


<h1><a name="convert">Converting projects (Convert to a QNX Project wizard)</a></h1>

<p>At various times, you may want to convert projects to give them a QNX nature. For example:</p>
<ul>
<li>if other developers committed a project to CVS without the <tt>.project</tt> and <tt>.cdtproject</tt> files, the IDE won't recognize the project as a <b>QNX</b> project when you get it from CVS
   </li>
<li>you wish to turn a <b>Standard Make C/C++ Project</b> into a <b>QNX C/C++ Application Project</b>.</li>
</ul>
<p>The QNX nature causes the IDE to use QNX <tt>make</tt> tools and the QNX <tt>make</tt> structure when building them.</p>
<p></p>
<p>The IDE lets you convert many projects in the same step, but the projects are all converted into projects of the same type.</p>
<p></p>

<hr>
<table>
<tr><td valign="top"><img src="image-lib/pointing.gif" alt="Note:"></td>
<td>If you wish to convert a <b>QNX Project</b> back into a <b>Standard Make C/C++ Project</b>, you can use the <b>Convert C/C++ Projects</b> wizard. From the main menu, select <b>File</b>--><b>New</b>--><b>Project</b>. In the left pane, select <b>C</b>. In the right pane, select <b>Convert to a C or C++ Project</b>.</td></tr>
</table>
<hr>


<p>

To convert to a <b>QNX Project</b>:</p>
<ol>

<li>From the menu, select <b>File</b>--><b>New</b>--><b>Project</b>.
   </li>
<li>In the left pane, select <b>QNX</b>.
   </li>
<li>In the right pane, select <b>Convert to a QNX Project</b>:<p>	<img src="./images/cwiz_convert_1.jpg" alt="Common wizards: Convert to a QNX Project; selecting wizard">
   </p></li>
<li>Click <b>Next</b>.
   </li>
<li>Fill in the fields described below:
   
   <p>The fields let you to convert a selection of projects to one of the following types of projects:</p><ul>
<li><b>QNX C Application Project</b>
   </li>
<li><b>QNX C Library Project</b>
   </li>
<li><b>QNX C++ Application Project</b>
   </li>
<li><b>QNX C++ Library Project</b></li>
</ul>

<dl>

<dt><b>Candidates for conversion</b></dt>
<dd>The IDE lists all the projects that can be converted. Check off all the projects you wish to convert.

</dd>
<dt><b>Convert to C or C++</b></dt>
<dd>Select whether your projects are C or C++.

</dd>
<dt><b>Convert to QNX project type</b></dt>
<dd>Select <b>QNX Application Project</b> or <b>QNX Library Project</b>, depending on whether or not your projects are applications or libraries.</dd>
</dl>


   
   </li>
<li>Click <b>Finish</b>.</li>
</ol>



</body>

</html>

<!--
/**********************************************************************
 * Copyright (c) 2002,2003 QNX Software Systems Ltd. and others.
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Common Public License v0.5
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v05.html
 * 
 * Contributors: 
 * QNX Software Systems - Initial API and implementation
***********************************************************************/
-->

Back to the top