Create a project in the IDE

To develop applications, you first 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 as they change.)

If you're creating an application from scratch, you'll probably want to create a QNX C Project or QNX C++ Project, which relies on the QNX recursive Makefile hierarchy to support multiple CPU targets. For more information about the QNX recursive Makefile hierarchy, see the Conventions for Recursive Makefiles and Directories chapter in the BlackBerry 10 OS Programmer's Guide.

In earlier versions of the IDE, there were two different project types: Managed make, which automatically generated a Makefile, and Standard make, which required a Makefile in order to be built. Now, you select a project type, and that determines the build system to use.

You can continue to create a make project using the C or C++ wizard.

Use the New Project wizard whenever you want to create a new project in the IDE.

Create a BlackBerry project

You need to create a project before you develop an application for the BlackBerry 10 OS. There are several types of projects that you can create:

Project Type Option Description Templates
Application Core Native Creates a native C/C++ application using the core APIs.
  • OpenGL — Create a sample project from an OpenGL ES 1.1 or OpenGL ES 2.0 application template that will create a simple animated application.
  • Screen — Create a sample project with a screen-based application template project.
  • Empty — Create an application project without any code.
  Cascades Creates a native C++ application using the Cascades UI framework.
  • Standard empty project — Create a basic application that loads a QML file.
  • List view — Create an application that uses a list view.
  • Tabbed pane — Create an application that allows users to switch between tabs.
  • Navigation pane — Create an application that uses a navigation pane to display a details screen.
Library Static Create a collection of object files that you can link into another application (libxx.a). none
  Shared Create a project that produces a C/C++ shared library. none
Native Extension Adobe AIR Create a project that produces a shared library for AIR Native Extensions.
  • HelloWorld — Create a project that produces an AIR Native Extension shared library from a template.
  • Empty — Create a project that produces an AIR Native Extension shared library without a code template.
  BlackBerry WebWorks Create a project for a custom extension for BlackBerry WebWorks HTML5 applications, with access to all of the BlackBerry 10 core APIs. none

When you create a core native application, a library, or a native extension, you can select a managed or a makefile build:

A Makefile project would work for any project that has a Makefile (by default). A Makefile project can launch anything as an external builder in any folder. The IDE starts make, and after make exits, the IDE refreshes the workspace to see what was created. You can change the make command and/or run specific make targets, but the IDE has no control over what make is doing.

Since the IDE doesn't know what's being built, it would have problems parsing source files (which it does internally to allow navigation, code completion, syntax highlighting, code generation, and refactoring). Therefore, if you use a Makefile project, you have to modify the Indexer (the internal parser) to point it to the Includes, as well as what Defines your parser uses for conditional compilation. The process of determining this is called Discovery, and it can be controlled by right-clicking a project and selecting Properties > C/C++ Build > Discovery Options.

If you know what includes and defines you want to use, you can specify them directly by right-clicking a project and selecting Properties > C/C++ General > Path and Symbols).

A managed project that doesn't use Makefiles, and all of the build settings are controlled by the GUI. However, it can use Makefiles, if you use the external make builder. In that case, it generates them automatically and they shouldn't be checked into source control.

The problem associated with this project type is its inability to perform a build of the project from command line (although, it's possible in simple cases with some additional setup files). In addition, there are restrictions on what you build and how, particularly if you use special steps in the build that involves other tools.

  1. On the File menu, click New > BlackBerry Project.
  2. In the New BlackBerry Project wizard, click the project type and the option that you want to use, and then click Next.
  3. If you selected Core Native Application, Cascades Application, or Adobe AIR Native Extension, select a template, and then click Next.
  4. Type a name for your project.
  5. Click Next.
  6. Select the API Level that your application supports, and then click Finish.

Managed make projects

Managed make projects provide full IDE graphical control and configuration. A managed make project automatically generates the Makefile for you; it dynamically generates your makefile based on the contents of your project folders. A managed make monitors your project and automatically updates the Makefile when you add or remove files in a project.

Last modified: 2013-12-21

comments powered by Disqus