Use libraries

You can use libraries to access and reuse existing functionality.

You can add the following types of libraries using the Add Library wizard from the QNX Momentics IDE:

Standard BlackBerry platform library
Choose this option to add libraries that are installed on the BlackBerry PlayBook tablet. These libraries are packaged as part of the BlackBerry Native SDK for Tablet OS.
External library
Choose this option to add libraries that exist outside of your workspace, such as third-party libraries or custom libraries that you have created or ported for use in the Native SDK.
Library project
Choose this option to add a dependency on another project that you have created. Typically, this is a library you create that you may want to reuse or you have separated out.
You can also add your libraries using compiler and linker options that you configure in the IDE or specify in your Makefile or on command line. If these libraries are part of the Native SDK, they are available on BlackBerry PlayBook tablets. However, there are times when you might want to use third-party libraries that are not available as part of the Native SDK. You will need to import that library to your project and any associated header files.

By default, external libraries are not available on the devices. Therefore, you must package external libraries used by your app as part of the BAR file. To do so, you must modify the BAR application descriptor file in your project. If you do not complete this step, your application will not be able to the locate the shared libraries at runtime and will fail to start or crash on the device.