Create or import a project

You can open an existing project in Microsoft Visual Studio or create a new one and populate it with your resources. If you create a new project using the Win32 template, a new BlackBerry solution target is created using the Win32 build target configuration as its template. If you use the <Empty> template, a new BlackBerry solution target is created using the default settings defined by Microsoft Visual Studio. When you use this configuration to build or run your application, Microsoft Visual Studio builds using the BlackBerry Native SDK compilers rather than the default Win32 compilers.

You can:

Convert a Win32 project

You already have an app that you have developed. Now you want to port it to BlackBerry 10 OS or BlackBerry PlayBook OS. Every app is a little different so here are the general guidelines you need to follow:

  1. In Microsoft Visual Studio, go to File > Open > Project/Solution and open your Win32 project.
  2. Create a BlackBerry solution target.
  3. Click Close.

These steps will add a bar-descriptor.xml file into your project. You will likely encounter build issues that you will need to resolve.

Create a new project

You can create a new project from scratch using the BlackBerry Native Plug-in for Microsoft Visual Studio.

  1. In Microsoft Visual Studio, go to File > New > Project.
  2. Select <Empty>.
  3. Enter a name for your project and click OK.

You'll need to create your targets but, you are now ready to start developing your application.

Import a BlackBerry core native project

If you've already written a BlackBerry 10 OS or BlackBerry PlayBook OS project using QNX Momentics IDE, you can import your existing BlackBerry core native project into Microsoft Visual Studio.

  1. On the File menu, click New > Project.
  2. In the New Project dialog, click Empty Project.
  3. Enter a Name for the project.
  4. Choose a location for the project.
  5. Select Create new solution or Add to solution.
  6. Click OK.
  7. In the Solution Explorer, right click the project name.
  8. Select Import BlackBerry Core Native Project.
  9. In the browser, navigate to your QNX Momentics IDE project and double-click the .cproject file.
  10. In the Import Summary window, review the files that were imported. Note that all files are imported including your bar-descriptor.xml and errors.
  11. Click OK.

If you created a Managed project in the QNX Momentics IDE, the linkers are in a file that can be imported. If you created an Unmanaged project, the libraries you need to add in the linker are found in the common.mk file.