Project Home
Project Home
Discussion Forums
Project Information
Project Info
wiki3406: ProjectsBuildAndIDE (Version 5)

This page is under construction

Projects, Build and IDE#

This article will talk about how to set-up projects in IDE, what types of projects to pick and how to organize projects to perform effective builds from IDE and command line. This article based on IDE 4.5.1 features.

What do you need to know about IDE project model#

Qnx Momentics IDE is based on open source Eclipse platform and open source CDT project which give essential part of functionality of projects and builds. IDE uses concept of "Workspace" which is user specific writable directory on the local host. This directory itself should never be part on revision control system shared between users nor be located on shared drive (unless you sure only one user using it). IDE (Eclipse) uses concept of "project" which is container for source and binaries together with some configuration files, which is located in workspace, which can be shared between users using version control system. Projects are flat - they cannot contain one another. However there is a concept of Working Set which allows you to filter and group projects if you have too many of them in a workspace. There is also special qnx Container project which allows you to control/build sets of projects at the same time.

When you pick location of workspace and names of the projects be aware that these names can be used in the build and make does not like directory/files with spaces and funky characters in them, even it is fine with IDE - build would not work with such paths.

If you used Visual Studio before you may think that project is virtual container which contains arbitrary files and directories - it is not the case with Eclipse. You can stretch eclipse project to use "Eclipse Links" but they have limited functionality and only support absolute paths now, which makes it impossible to share. In general you have to have a directory in file system that contains project root (source and build output) and same directory would contain eclipse project metadata. The only option you have is to put project inside workspace or outside workspace. However you can your imagination about how this directory is created - you can check out top level from one place, and subdirectories from another, you can use OS soft links or some other means to create it.

Qnx IDE supports 3 project types for C/C++: Makefile project, Qnx project and Managed project.

Makefile Project#

Makefile project would work for any project that has a Makefile. IDE kicks make and after make exists refreshes the workspace to see what you have created. You can change make command and/or run specific make targets, but IDE has no control over what make is doing.

Because IDE would not know what is building it would have problems parsing source files (which it does internally to allow Navigation, Code Completion, Syntax Highlighting, Code Generation and Refactoring). So if you using Makefile project you have to tune "Indexer" (the internal parser) to point it to where are missing Includes and what Defines your parser uses for conditional compilation. The process of figuring this out called "Discovery" and can be controlled using "Discovery Options". If you know what includes and defines you are using it is probably easier just to enter them directly (Project->Properties->C/C++ General -> Path and Settings).

Qnx Project#

Qnx project is special flavor or Makefile project with additional control over the make. To use qnx project you also have to use qnx recursive makefiles. Qnx recursive makefiles - are conversions on creating makefiles which uses specific variables and uses specific layout. This allow IDE to parse makefile and provide UI control over makefile options and build variants.

Managed Project#

Managed project is CDT specific project which does not use makefiles, and all build settings are controlled by UI. The inconvenience of it is inability to perform a build of the project from command line* (* - it may be possible in simple cases with some extra setup files or you use makefile generator). Also there are restrictions on what you building and how, especially if you use special steps in the build which involves other tools.

Original Project Creation#

Lets consider scenarios when you creating project for the first time (compare to checking out pre-made project, which will be discussed below)

When creating a new IDE project you have to pick from one of the following options:

  1. This is new project, I will create all sources in IDE
  2. The sources/structure exists already in the file system, I want to "attach" IDE project to it
  3. The project source/structure exists in the Version Control

For #1 - pick one the project types described above. Use File->New... menu and pick C or C++ project wizard:

  • For Qnx Project pick "Qnx C Project" (or "Qnx C++ project" for c++). On the first page pick build variants. For example x86 Debug & Release.
  • For Makefile pick "C Project" (or "C++ Project" for c++).
  • For Managed project pick "C Project" (or "C++ Project" for c++).

Active Tab Versions Inactive Tab - left sideAssociations (1) Inactive Tab - left sideAttachments Inactive Tab - left sideBack LinksInactive Tab - right side  
    Version From To Version Comment Created By
    Version 33 Elena Laskavaia  -  07/19/2010
    Version 32 added some text about Build Configurations Elena Laskavaia  -  02/25/2010
    Version 31 Incorporated some feedback from reviews. Steve Reid  -  08/13/2009
    Version 30 More polishing. Steve Reid  -  08/12/2009
    Version 29 More editorial changes. Steve Reid  -  08/12/2009
    Version 28 Editorial changes. Steve Reid  -  08/11/2009
    Version 27 Added reference to mkbuild Elena Laskavaia  -  06/12/2009
    Version 26 Elena Laskavaia  -  04/23/2009
    Version 25 Alex Chapiro  -  04/03/2009
    Version 24 remove details for container project configuration, suer can read user doc if need to Elena Laskavaia  -  04/03/2009
    Version 23 Elena Laskavaia  -  04/03/2009
    Version 22 Alex Chapiro  -  04/03/2009
    Version 21 Elena Laskavaia  -  04/03/2009
    Version 20 Elena Laskavaia  -  04/03/2009
    Version 19 Elena Laskavaia  -  04/03/2009
    Version 18 Elena Laskavaia  -  04/03/2009
    Version 17 Elena Laskavaia  -  04/03/2009
    Version 16 Elena Laskavaia  -  04/03/2009
    Version 15 Elena Laskavaia  -  04/03/2009
    Version 14 Elena Laskavaia  -  04/02/2009
    Version 13 Elena Laskavaia  -  04/01/2009
    Version 12 Elena Laskavaia  -  03/31/2009
    Version 11 Elena Laskavaia  -  03/31/2009
    Version 10 Elena Laskavaia  -  03/20/2009
    Version 9 Elena Laskavaia  -  03/20/2009
    Version 8 Elena Laskavaia  -  03/20/2009
    Version 7 Elena Laskavaia  -  03/20/2009
    Version 6 Elena Laskavaia  -  03/18/2009
    Version 5 Elena Laskavaia  -  03/17/2009
    Version 4 Elena Laskavaia  -  03/17/2009
    Version 3 Elena Laskavaia  -  03/17/2009
    Version 2 Elena Laskavaia  -  03/17/2009
    Version 1 Elena Laskavaia  -  03/17/2009