Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
wiki2859: IDEBuildFAQ (Version 9)

QNX IDE Projects and Build FAQ#

How can automated builds be set up with 4.5?#

1) If you using Makefile Projects - simply call make from project directory, you have to create a super makefile to build all required projects (can create a super project for that too)

2) Using of container projects. This option could be convenient for those who use a big code base. Container is a holder of various projects (among them could be other containers as well). This is a user's decision how to combine projects into container. For example third-party service libraries could be assembled in one container. Each container has a set of different build configurations (this is almost the same as assigning make targets such as debug, release etc.). To build the whole workspace just launch a root container build specifying configuration. This structure should be mirrored into command line build. To provide this, insert special make file into top container's root directory The content looks like that:

<configuration_1>  :
      cd ../Child_Container_1 ; make <target name>
      cd ..
      ...
      cd ../Child_Project_k ; make <target name>
      ...
<configuration_n>  :
      ...

3) Using mksbp utility

4) Using make for QNX Projects. In this case super makefile has to contain some setup which includes setting "project path" macros. The recommended way is to create extra file with this definitions (here mylib is the project name):

  • if you project and dependency live in workspace
    • PROJECT_ROOT_mylib=$(PROJECT_ROOT)../lib1
  • for references out of workspace
    • PROJECT_ROOT_mylib=F:/libs/mylib

(repeat this for every project)

Then add to this extra make file launch of you "root" make file or add environment variable MAKEFILE=<extra-makefile>.

How can I create Makefile Project in IDE 4.5?#

New->C Project opens a C Project Wizard Select Makefile->Empty Project Select QNX QCC on the right (important!)

QNX QCC toolchain set environment variables, such as CC, LD etc. They are automatically corrected when you switch compiler or build variant from Settings page of project properties. If you don't want these variable to be defined, you can select and undefine them in Environment tab.

What is the difference between Managed C project with QNX toolchain and QNX Project?#

Managed C project (MBS) with QNX toolchain can be used in similar way as QNX Project. They are both managed projects. QNX Project is based on qnx recursive makefiles, when you change setting of QNX Project you modifying a makefile for this project. If you change makefile manually - QNX Project would read and recognize this change (it may be limited to known build macros). Managed project stores all setting in XML and they cannot be changed outside of IDE. You can pick builder for Managed project - internal builder, or external make builder. In the second case makefiles would be generated that represent build process for this project, but you cannot change those makefiles. Besides that MBS has a bit more modern UI and more flexibility for project structure (you can exclude some files to be compiled for example). On the other hand QNX Project has very good build variants structure which is nice you building for 5 platforms at the same time.

Where "QNX Project" stores its metadata?#

QNX Project properties mostly stored directly in makefiles, in particular "common.mk". Additional macro and functions stored in internal makefile ".qnx_internal.mk". Setting for current active builds are stored in workspace metadata, outside of project. If you want it to be stored with project you can check "Share all project properties" - in this case it would be stored in .cproject file inside the project folder.

Can I create projects targeting different than QNX OS or use different compiler?#

Yes, QNX IDE is based on Eclipse CDT which allow to create project for any target. You need to install appropriate toolchain on your host and you may need to create a toolchain definition from IDE. Search CDT newsgroup for this topic.

How to change default setting for new projects?#

To enable QNX Toolchain as preferred toolchain for Makefile and Managed projects: * Open Window->Preferences...

  • C/C++->New CDT project wizards
  • Select Makefile project->Empty Project
  • Select QNX QCC
  • Click on button "Make toolchain(s) preferred"
  • Click OK.

If you anticipating creating many new makefile C projects and they have different then default values, you can change default setting for new projects

  • Window->Preferences...
  • C/C++->New CDT project wizards->Makefile Project
  • Go through tabs and pick defaults for your projects

For Qnx Projects:

  • Window->Preferences...
  • QNX->New Project
  • Go through tabs and pick defaults for your projects

How to create keyboard shortcut for Build?#

To fast access to Build command define a keyboard shortcut (e.g. F6).

  • Windows->Preferences...
  • Type Keys in filter
  • Select Keys
  • Check Include unbound commands
  • Type build in right panel filter
  • Select Build Project
  • Select Binding field
  • Press keystroke <F6>
  • Click Apply
  • Click Copy command
  • Select C/C++ Editor in When combo box
  • Select Binding field and press <F6>
  • Click Apply again

How show line numbers in the C/C++ editor?#

  • Open Window->Preferences
  • Type "line" in filter
  • Select Text Editors
  • Check Show line numbers
  • Click OK


Back



Active Tab Versions Inactive Tab - left sideAssociations Inactive Tab - left sideAttachments Inactive Tab - left sideBack LinksInactive Tab - right side  
    Version From To Version Comment Created By
    Version 16 Updated the title of the "Projects, Building, and the IDE" article. Steve Reid  -  08/13/2009
    Version 15 What is recommended way to organize project structure for IDE? Elena Laskavaia  -  04/23/2009
    Version 14 updated FAQ with Thomas comments Elena Laskavaia  -  04/03/2009
    Version 13 !! How to create different build configuration in QNX Project? Elena Laskavaia  -  01/28/2009
    Version 12 Elena Laskavaia  -  01/19/2009
    Version 11 David Cummings(deleted)  -  11/03/2008
    Version 10 Is it possible to configure the IDE to add a "Build Project" icon on the toolbar? Elena Laskavaia  -  10/31/2008
    Version 9 Where "QNX Project" stores its metadata? Elena Laskavaia  -  10/31/2008
    Version 8 How show line numbers in the C/C++ editor? Elena Laskavaia  -  10/31/2008
    Version 7 How to create keyboard shortcut for Build? Elena Laskavaia  -  10/31/2008
    Version 6 How to change default setting for new projects? Elena Laskavaia  -  10/31/2008
    Version 5 Elena Laskavaia  -  10/31/2008
    Version 4 Elena Laskavaia  -  10/31/2008
    Version 3 Elena Laskavaia  -  10/31/2008
    Version 2 Elena Laskavaia  -  10/31/2008
    Version 1 Elena Laskavaia  -  10/31/2008