You need to create a project that will contain your source code and related files.
The project will have an associated builder that incrementally compiles source
files.
To create a project for your source code:
-
In your workspace, you create a single project that reflects all the components
that reside in your existing source tree by selecting .
-
Select the type of project you want to create. For example, expand
C++ and select C++ Project,
then click Next.
By default, the windows will filter the
Toolchain and Project types
that show in the resulting lists based on the language support for the project
type you select.
-
Name your project (e.g. EntireSourceProjectA).
Note: Although the wizard allows it, don't use spaces or any of the following characters
in your project name:
| ! $ ( " ) & ` : ; \ ' * ? [ ] # ~ = % < > { }
These characters cause problems later with compiling and building, because the underlying tools such as
make and
qcc don't like them in directory and file names.
-
To tell the IDE where the resources reside in the
filesystem (since they don't reside in your workspace), disable the
Use Default Location option.
-
In the Location field, type the path to your source (or
click Browse…).
Next, you want to select a template for your project from the following:
- Executable — Provides an executable application. This project type
folder contains the following templates.
- Empty Project — a single source
project folder that doesn't contain any files.
- QNX C++ Executable Project — a C++
executable project.
- Hello World C++ Project — a simple
C++ application with main.
After specifying one of these templates, the workbench creates a
project with only the metadata files required for your project type.
Now, you can modify these source files, as required, and provide the
source files for the project's target. Note that for an
Executable project type, a
Makefile is automatically created for you.
- Shared Library — An executable module
compiled and linked separately.
- Static Library — A collection of object
files that you can link into another application
(libxx.a).
- Makefile Project — Creates an empty project
without any metadata files.
By default, the Toolchain and template
types that are currently shown in the lists are based on the
language support for the project type that you selected.
-
From the Project types list, expand
Executable and select a project type. For example, an
Empty Project provides you with a simple
application.
-
Select the QNX QCC toolchain from the
Toolchain list.
-
Click Finish. If a message box prompts you to change
perspectives, click Yes.
You should now have a project that looks something like this in the corresponding Projects view:
