[Previous] [Contents] [Index] [Next]

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

IDE Concepts

You can select a topic from this diagram:

Utilities Used by the IDE Getting System Information Using Code Coverage Common Wizards Reference Preparing Your Target Developing Photon Applications Developing C/C++ Programs Where Files Are Stored Building OS and Flash Images Migrating to the 6.3 Release Tutorials IDE Concepts About This Guide Analyzing Your System With Kernel Tracing Profiling an Application Finding Memory Errors Debugging Programs Managing Source Code Launch Configurations Reference

Workflow with concepts chapter highlighted

This chapter introduces key concepts used in the IDE.

In this chapter...

What is an IDE?

Welcome to the Integrated Development Environment (IDE), a powerful set of tools in the QNX Momentics Professional Edition development suite. The IDE is based on the Eclipse Platform developed by Eclipse.org, an open consortium of tools vendors (including QNX Software Systems).

The IDE incorporates into the Eclipse framework several QNX-specific plugins designed for building projects for target systems running the QNX Neutrino RTOS. The tools suite provides a single, consistent, integrated environment, regardless of the host platform you're using (Windows, Linux, Solaris, or QNX Neutrino). Note that all plugins from any vendor work within the Eclipse framework in the same way.

An IDE for building embedded systems

The IDE provides a coherent, easy-to-use work environment for building your applications. If you've used an IDE before, then you already have a good idea of the convenience and power this kind of toolset can offer.

Through a set of related windows, the IDE presents various ways of viewing and working with all the pieces that comprise your system. In terms of the tasks you can perform, the toolset lets you:

Note: The IDE doesn't force you to abandon the standard QNX tools and makefile structure. On the contrary, it relies on those tools. And even if you continue to build your programs at the command line, you can also benefit from the IDE's unique and powerful tools, such as the QNX System Analysis tool and the QNX System Profiler, which can literally show you, in dynamic, graphical ways, exactly what your system is up to.

Starting the IDE

After you install QNX Momentics, you'll see -- depending on which host you're using -- a desktop icon and/or a menu item labeled "Integrated Development Environment" in the start or launch menu. To start the IDE, simply click the icon or the menu item.

Note: On Solaris, you must start the IDE from the command-line:

$QNXHOST/usr/qde/eclipse/qde -vmargs -Xms256m -Xmx512m

Note: On Neutrino, do not start the IDE from the command line if you've used the su command to switch to a different user. It will be unable to attach to your Photon session and will fail to start.

Starting the IDE for the first time

The first time you start the IDE on Windows, the Workspace Launcher dialog will ask you where to store your workspace. All of your IDE projects will be stored in this directory.

Workspace Launcher

Selecting a workspace directory

By default, the IDE offers to put your workspace in your home directory ($HOME/workspace on QNX, Linux and Solaris), or the path specified in the QNX Momentics IDE shortcut (C:/QNX630/workspace) on Windows. To store your workspace in another location:

=>> Click the Browse... button and select a directory for your workspace.

To continue loading the IDE, click the OK button.

Note: Check the Use this as the default and do not ask again box to always use this workspace when launching the IDE.

To change the default workspace location on QNX, Linux, and Solaris, launch qde with the -data workspace_path option.

The IDE welcomes you

After you choose a workspace location, the IDE displays a welcome screen with several options that help to introduce you to the IDE:

IDE welcome screen

The IDE's welcome screen

The icons on the welcome screen give you access to:

Icon Description
Workbench The Workbench icon takes you to the workbench screen and your workspace.
Overview Provides links to overviews of the IDE: the Documentation Roadmap, Team Support (an important topic if you use CVS), Workbench Basics, and C/C++ Online Docs.
Tutorials Links to the Quick Start (10 Steps to Your First QNX Program), and the CDT's C/C++ tutorials.
What's New Links to documents describing new features: the new features in this release and information about migrating from a previous release.

You can return to this welcome screen at any time by choosing Help-->Welcome.

Starting the IDE after an update

After you've updated one or more IDE components, such as the CDT or an Eclipse add-on, you might be prompted to process these updates the next time you launch the IDE:

Configuration Changes

The Configuration Changes dialog

Note: This doesn't apply to the QNX Momentics 6.3.0 Service Pack 2 update, although it does apply to the 6.3.0 Service Pack 1 update.

To process IDE updates:

  1. In the Configuration Changes dialog, click the + symbol to expand the list of updates.
  2. If you see an update you don't want to apply to the IDE, clear its check box.
  3. Click the Finish button.

    The IDE processes its updates.

    The IDE displays the Install/Update dialog.


    The Install/Update dialog tells you to reboot.

  4. Click Yes to restart the IDE with all of the processed updates. Click No to continue using the IDE.

Starting the IDE from the command line

You can also start the IDE by running the qde command:

  1. Go to the directory where the qde.exe executable (Windows) or the qde script (all other hosts) resides. For example, C:/QNX630/host/win32/x86/usr/qde/eclipse.
  2. Run this command:

Note: Don't run the eclipse command, even thought it may seem to work. Always use qde instead, because it sets up the proper QNX-specific environment.

You can also direct the IDE at a particular workspace location. For details, see the section "Specifying a workspace location" in this chapter.

For more information on starting the IDE, including advanced execution options for developing or debugging parts of Eclipse itself, see Tasks-->Running Eclipse in the Workbench User Guide.


When you first run the IDE, you should see the workbench, which looks like this:


The first thing you see.

For details about the workbench's menu, see Reference-->User Interface Information-->Workbench menus in the Workbench User Guide. For a basic tutorial on using the workbench UI, see Getting Started-->Basic tutorial-->The Workbench in the Workbench User Guide.

Help system

The IDE contains its own help system, which is an HTML server that runs in its own window "above" the workbench (i.e. the help isn't a perspective or a view).

Note: On Linux, the IDE tries to start the Mozilla web browser to display the online help system. Red Hat Enterprise Linux 4 now ships with Firefox instead of Mozilla, so you'll have to change the help browser setting:
  1. Open the Preferences dialog (Window-->Preferences...).
  2. In the left-hand panel, select the Help item.
  3. Change the Custom Browser command to firefox %1.
  4. Click OK to close the Preferences dialog and save your changes.

Opening the IDE Help

=>> From the main menu, select Help-->Help Contents.

Navigating the Help

The left pane of the Help window is the bookshelf, which has links to the various documentation sets. Click one of the links to view a document. Note that you can return to the bookshelf at any time by clicking the Table of Contents button (Icon: Help Window; Home button).

The Contents pane includes at least the following titles:

Workbench User Guide
Written by Eclipse.org, the book explains Eclipse concepts and core IDE functionality, and includes tutorials on using the workbench. Although some of the workbench topics are covered lightly here in this IDE User's Guide, you can find full documentation on using the workbench in the Eclipse Workbench User Guide.
QNX Momentics Professional Edition
The QNX documentation set, which includes several titles:

Note: Some title pages have content on them, some don't. If you click a title, and the right side of the window remains blank, you've hit a "placeholder" title page. Simply expand the title entry to see its contents.

Help bookmarks

You can create a bookmark for any help page:

  1. On the Help browser's toolbar, click the Bookmark Document button (Icon: Help Window; add bookmark button).
  2. To see your bookmarks, click the Bookmarks (Icon: Help Window; bookmarks view button) tab at the bottom of the contents pane.

To learn more about the IDE's Help system, follow these links in the Eclipse Workbench User Guide: Concepts-->Help system.

Tips and tricks

When you select the Tips and tricks item from the Help menu, you'll see a list of tips and tricks pages. Select the page for the Eclipse platform, which covers several topics:


A perspective is a task-oriented arrangement of the workbench window.

For example, if you're debugging, you can use the preconfigured Debug perspective, which sets up the IDE to show all the tools related to debugging. If you wanted to work with the elements and tools related to profiling, you'd open the QNX Application Profiler perspective.

You can customize a perspective by adding or removing elements. For example, if you wanted to have certain profiling tools available whenever you're debugging, you could add those elements to the Debug perspective.

Perspectives generally consist of these components:

Perspectives govern which views appear on your workbench. For example, when you're in the Debug perspective, the following main views are available (in the default configuration):

Views and editors


Views organize information in various convenient ways. For example, the Outline view shows you a list of all the function names when you're editing a C file in the C/C++ editor. The Outline view is dynamic; if you declare a function called mynewfunc(), the Outline view immediately lists it.

Views give you different presentations of your resources. For example, the Navigator view shows the resources (projects, folders, files) you're working on. Like individual panes in a large window, views let you see different aspects of your entire set of resources.

Views provide:


You use editors to browse or change the content of your files. Each editor in the IDE is designed for working with a specific type of file. The editor that you'll likely use the most is the C/C++ editor.

The editor area is a section of the workbench window reserved for editors. Note that views can be anywhere on the workbench except in the editor area.

The IDE lets you rearrange views and editors so they're beside each other (tiled) or stacked on top of each other (tabbed).

Note: If you wish to use a different text editor than the one that's built into the IDE, you can do so, but you'll lose the integration of the various views and perspectives. For example, within the IDE's text editor, you can set breakpoints and then see them in the Breakpoints view, or put "to-do" markers on particular lines and see them in the Tasks view, or get context-sensitive help as you pause your cursor over a function name in your code, and much, much more.

But if you want to use your own editor, we recommend that you:

  1. Edit your files outside of the IDE.
  2. Make sure that you save your files in the right place, e.g. on Windows:


  3. From within the IDE, use the Refresh command (right-click menu in the Navigator view or the C/C++ Projects view).

Projects and workspace

Projects are generic containers for your source code, makefiles, and binaries. Before you do any work in the IDE, you must first create projects to store your work. One of the more common projects is a QNX C/C++ Project.

Note: Throughout this guide, we use the term "C/C++" as shorthand to cover both C and C++ projects. The titles of elements within the IDE itself are often explicit (e.g. "QNX C Project," "QNX C++ Project," etc.).

When you create a file within a project, the IDE also creates a record (local history) of every time you changed that file and how you changed it.

Your workspace is a folder where you keep your projects. For the exact location of your workspace folder on your particular host, see the appendix Where Files Are Stored in this guide.

Specifying a workspace location

You can redirect the IDE to point at different workspaces:

=>> From the directory where the qde.exe executable (Windows) or the qde script (all other hosts) resides, run this command:

qde -data path_to_workspace

This command launches the IDE and specifies where you want the IDE to create (or look for) the workspace folder.

Note: Don't use spaces when naming a project or file -- they can cause problems with some tools, such as the make utility.

Also, don't use case alone to distinguish files and projects. On Unix-style hosts (i.e. Solaris, Linux, QNX Neutrino), filenames are case-sensitive, but in Windows they're not. For example, Hello.c and hello.c would refer to the same file in Windows, but would be separate filenames in Unix-style systems.

How the IDE looks at projects

The IDE associates projects with natures that define the characteristics of a given project. For example, a Standard Make C Project will have a "C nature," whereas a QNX C Project will have a C nature as well as a QNX C nature, and so on. Note that QNX C or C++ projects assume the QNX recursive makefile hierarchy to support multiple target architectures; standard make projects don't.

Note: For more on the QNX recursive makefile hierarchy, see the Conventions for Makefiles and Directories appendix in the Programmer's Guide.

The natures tell the IDE what can and can't be done with each project. The IDE also uses the natures to filter out projects that would be irrelevant in certain contexts (e.g. a list of QNX System Builder projects won't contain any C++ library projects).

Here are the most common projects and their associated natures:

Project Associated natures
Simple Project n/a
Standard Make C Project C
Standard Make C++ Project C, C++
QNX C Project C, QNX C
QNX C Library Project C, QNX C
QNX C++ Project C, C++, QNX C
QNX C++ Library Project C, C++, QNX C
QNX System Builder Project QNX System Builder

The IDE saves these natures and other information in .project and .cdtproject files in each project. To ensure that these natures persist in CVS, include these files when you commit your project.

Note: The IDE doesn't directly support nested projects; each project must be organized as a discrete entity. However, the IDE does support project dependencies by allowing a project to reference other projects that reside in your workspace. Container projects also let you logically nest projects by collecting several projects together.

Host and target machines

The host is the machine where the IDE resides (e.g. Windows). The target is the machine where QNX Neutrino and your program actually run.

Target agent (the qconn daemon)

The qconn daemon is the target agent written specifically to support the IDE. It facilitates communication between the host and target machines.

If you're running the IDE on a QNX Neutrino PC (self-hosted), your target machine may also be the host machine. In this case, you must still run qconn, even though your host machine is "connecting to itself."

For more information about connection methods, see the Launch Configurations Reference chapter in this guide.


Before you can run a program, you must tell the IDE's launcher what program to run, what target to run it on, what arguments to pass to the program, and so on.

If you want to run the program on another target or run with different options (e.g. with profiling enabled), you must create a new launch configuration or copy a previous one and modify it.


Resources is a collective term for your projects, folders, and files.


Wizards guide you through a sequence of tasks. For example, to create a QNX C Project, you run a wizard that takes you through all the steps and gathers all the necessary information before creating the project. For more information, see the Common Wizards Reference chapter in this guide.

Keyboard shortcuts

You'll find many keyboard shortcuts for various UI tasks throughout the IDE. You can easily create your own shortcuts. For instructions, follow these links in the Workbench User Guide:


Note: Some existing shortcuts and some commands that can be assigned to shortcuts only apply to Java code and projects. For example, the "Search for Declaration in Workspace" command, which is bound to Ctrl-G only works with Java code.


The Preferences dialog (under the Window menu) lets you customize the behavior of your environment -- when to build your projects, how to open new perspectives, which target processors to build for, etc.

Preferences menu

Note: Besides global preferences, you can also set preferences on a per-project basis via the Properties item in right-click menus.

Version coexistence

The QNX Momentics 6.3.0 development suite lets you install and work with multiple versions of Neutrino (from 6.2.1 and later) -- you can choose which version of the OS to build programs for.

When you install QNX Momentics, you get a set of configuration files that indicate where you've installed the software. The QNX_CONFIGURATION environment variable stores the location of the configuration files for the installed versions of Neutrino; on a self-hosted Neutrino machine, the default is /etc/qnx.

QWinCfg for Windows hosts

On Windows hosts, you'll find a configuration program (QWinCfg) for switching between versions of QNX Momentics.

You launch QWinCfg via the start menu (e.g. All Programs-->QNX Momentics 6.3.0-->Configuration).

For details on using QWinCfg, see its entry in the Utilities Reference.

qconfig utility for non-Windows hosts

The qconfig utility lets you configure your machine to use a specific version of Neutrino:

Note: In the above command, you must use the "back tick" character (`), not the single quote character (').

When you start the IDE, it uses your current qconfig choice as the default version of the OS; if you haven't chosen a version, the IDE chooses an entry from the directory identified by QNX_CONFIGURATION. If you want to override the IDE's choice, you can choose the appropriate build target.

Coexistence and PhAB

If you're going to create Photon applications for QNX 6.3.0 and 6.2.1 using PhAB, you will need to use the older version of PhAB to create your application resources.

To ensure that you're always using the older version of PhAB to create your resources:

  1. Choose Window-->Preferences from the menu to display the Preferences dialog.
  2. Expand the QNX item in the list, then choose Appbuilder to display the Appbuilder preferences:

    PhAB preferences

  3. Un-check the Use default check box.
  4. Change the Path to Photon Appbuilder to C:/QNXsdk/host/win32/x86/usr/bin/appbuilder.bat.
  5. Click OK to save your changes and close the Preferences dialog.

Specifying which OS version to build for

To specify which version of Neutrino you want the IDE to build for:

  1. Open the Preferences dialog (Window-->Preferences).
  2. Select QNX.
  3. Using the dropdown list in the Select Install field, choose the OS version you want to build for.
  4. Click Apply, then OK.

Environment variables

Neutrino uses these environment variables to locate files on the host machine:

The location of host-specific files.
The location of target backends on the host machine.
The location of the qconfig configuration files.
The location of included *.mk files.
The directory to use for temporary files. gcc uses temporary files to hold the output of one stage of compilation used as input to the next stage: for example, the output of the preprocessor, which is the input to the compiler proper.

The qconfig utility sets these variables according to the version of QNX Momentics that you specified.

What's new in the IDE?

Each update to the Momentics IDE adds new abilities and features.

What's new in 6.3.0 SP1?

Here are some of the more interesting or significant changes made to the QNX Momentics IDE since the release of QNX Momentics 6.3.0:

What's new in 6.3.0 SP2?

Here are some of the more interesting or significant changes made to the QNX Momentics IDE since the release of QNX Momentics 6.3.0 SP1:

General IDE

The QNX Momentics 6.3.0 SP2 IDE sports many useful new features:

New look and feel

The look and feel of the workbench has evolved. Here are some of the things you will notice:

3.0 workbench

Responsive UI

A number of changes have occurred in the UI to support a higher level of responsiveness. This includes support for running jobs in the background instead of tying up the UI and having to wait.

The IDE now features a:

Progress view

The new Progress view showing the progress of a CVS checkout and a Workspace build background operation. Many user operations can now be run in the background. When you see the progress dialog with the Run In Background button you can select it to get back to work.

Progress dialog

This dialog also shows you the details of other currently running operations in the workspace and informs you when one operation is blocked waiting for another to complete.

Editor management enhancements

A number of changes and enhancements have gone into the editor management in the QNX Momentics IDE.

The IDE now provides:

Editor drop-down menu


The QNX Momentics IDE now contains basic support for themes. This currently goes as far as allowing customization of colors and fonts used in the workbench.

Background workspace auto-refresh

Changes made in the local file system can now be automatically refreshed in the workspace. This saves you from having to do a manual File > Refresh every time you modify files with an external editor or tool. This feature is currently disabled by default, but can be turned on from the Workbench preference page.

Regular expressions in Find/Replace dialog

The Find/Replace dialog for text editors now supports searching and replacing using regular expressions. Press F1 to get an overview of the regular expression syntax, and press Ctrl+Space to get Content Assist for inserting regular expression constructs.

When the cursor is placed in a dialog field, that is supported by Content Assist, a small light-bulb above the upper-left corner of the field indicates its availability.

Find/Replace dialog

New text editor functions

The displayed width of tabs and the text selection foreground and background colors are now customizable in the text editor. See the Workbench > Editors > Text Editor page:

Text editor preferences

New editor functions

All text editors based on the QNX Momentics IDE editor framework support new editing functions, including moving lines up or down (Alt+Arrow Up and Alt+Arrow Down), copying lines (Ctrl+Alt+Arrow Up and Ctrl+Alt+Arrow Down), inserting new a line above or below the current line (Ctrl+Shift+Enter and Shift+Enter), and converting to lowercase or uppercase (Ctrl+Shift+Y and Ctrl+Shift+X).

Double clicking on the line number in the status line is the same as Navigate > Go to Line... (Ctrl+L).

Opening external files

The File menu now includes an Open External File... option that lets you open any file in the workbench without having to import it into a project.

C/C++ user interface

The new CDT in the QNX Momentics 6.3.0 SP2 IDE features:

Outline filters and groups

The Outline view now offers users the ability to filter out certain elements such as defines and namespaces as well as the ability to group all include statements together.

Outline filters

New Class wizard

Creating new C++ classes continues to get easier with a number of enhancements to the C++ class creation wizard.

New Class wizard

New C/C++ wizards

A new toolbar has been created that facilitates the creation of a number of standard C/C++ objects:

new Wizard toolbar

Code folding

The C/C++ editor supports code folding for functions, methods, classes, structures and macros.

code folding

Makefile editor

The Makefile editor has a whole new set of preferences and now supports code folding.

Makefile Editor               preferences

Makefile Editor code               folding

C/C++ debug and launch

Debugging support and application launching in the CDT has been improved:

Thread-specific breakpoints

The C/C++ Debugger now supports thread-specific breakpoints. After placing a breakpoint, look at its Breakpoint Properties to see which threads or processes it is active for.

thread-specific               breakpoints

Breakpoint filtering

The Breakpoints view now lets you filter out all of the non-relevant breakpoints based on the specific process that is being debugged.

Breakpoint               filtering

Workspace variable support

C/C++ launch configurations now include support for workspace variables in the Environment, Argument and Working Directory tabs.

Mixed source/assembly

Gone are the days of toggling the C/C++ editor to show the assembly of a program. Instead use the Disassembly View to see both assembly code and source mixed:

Disassembly view

Global variables

Global variables can now be added to the Variables View instead of having to add them as separate expressions.

Global variables view

Debug console

The Debug Console has moved to being a proper console selection of its own in the generic Console View

GDB      console

Automatic refresh options

Configure the default behavior for the automatic retrieval of shared library and register information in the C/C++ debugger.

Automatic               Refresh options

Register values can be set to refresh automatically or manually from the Launch configuration dialog with the Advanced button of the Debug tab.

Advanced    Debug options

Finer-grained Launch configurations

You can now maintain separate Run/Debug launch configurations for debugging core files, attaching to a running process, attaching to your target with pdebug (serial debugging), and attaching to your target with qconn (TCP/IP debugging).

Finer-grained Launch configurations

C/C++ project configuration and build

Project configuration and building has been improved:

Automatic project settings discovery

Automatically generate project defines and include path settings from the C/C++ Make Project > Discovery Options project settings.

Note that this is for projects being built with one of the platform-specific nto*-gcc drivers and a custom Makefile.


Include paths & symbols

Use the C/C++ Include Paths and Symbols to set up the project settings appropriately for searching, indexing and other source navigation functionality.

Path               preferences

Source folders

Use the C/C++ Project Paths project properties to determine those files and directories that should be specifically considered as containing source, output or library content. Performance can be improved by limiting the directories and files of large projects.

Source               folders

C/C++ file types

Define the types of specific files, especially C++ headers without extensions, using the C/C++ File Types global preference or project property.

C/C++ File               Types

C/C++ working set

Working sets containing only C/C++ projects and resources can be created now by creating a C/C++ Working Set definition.

C/C++               working set

C/C++ editing and source navigation

Editing and navigating your C/C++ source files is now easier with:

C/C++ content assist

Code editing just got easier with a more full featured content assist. Completions are now provided in the C/C++ editor for:

Content Assist

Configure completion options in the global C/C++ Editor Preferences:

Content Assist preferences

Rename refactoring

Use the Outline view or the C/C++ Editor's Refactor > Rename context menu to refactor class and type names, methods, functions and member names.

Rename               Refactoring

Open type

Use Navigate > Open type (Ctrl-Shift-T) to open up the declaration of C/C++ classes, structures, unions, typedefs, enumerations and namespaces.

Open type

C/C++ Browsing perspective

Use the C/C++ Browsing Perspective to navigate the class and structure members of a particular project.

Browsing               perspective

Makefile editor

The Makefile Editor now provides syntax highlighting, code completion and content outlining capabilities.

Makefile               editor

Search enhancements

The C/C++ Search Dialog provides context sensitive searches from the Outline view as well as resource selection restricted searches in the C/C++ Search Dialog

Hyperlink navigation

The C/C++ Editor supports hyperlink navigation if enabled via Window > Preferences > C/C++ > C/C++ Editor Preferences. Then you can use Ctrl - Click to jump to the declaration of an item directly in the C/C++ editor.

Hyperlink Navigation

Index error markers

Enable C/C++ indexing and indexer error reporting in the C/C++ Indexer properties. This helps identify projects missing path configuration information.

Index error markers

Configure the indexer from the C/C++ Indexer project settings:

Indexer settings

Momentics tools

The exclusive QNX Momentics tools have also been updated and improved:

Memory Analysis

The following new features have been added to the Memory Analysis perspective:

The Memory Information and Malloc Information views are now part of the System Information perspective.

System Profiler

New features added to the System Profiler in 6.3.0 SP1:

New features added to the System Profiler in 6.3.0 SP2:

Code Coverage

Improved reporting output and export capabilities.

Code  Coverage report

System Information

The System Information perspective has been rewritten with a new update control mechanism, and simplified Process Information and Signal Information views.

The new Process Information view:

Process Information view

The new Signal Information view:

Signal Information view

The Memory Information and Malloc Information views (formerly found in the Memory Analysis perspective) are now part of the System Information perspective.

Memory Information view

Malloc Information view

System Builder

The following new features have been added to the System Builder perspective:

System Builder  editor

[Previous] [Contents] [Index] [Next]