Built-in C libraries

The BlackBerry 10 OS supports POSIX-compliant C and C++, as well as Dinkum C99 and C++ libraries.

If you are developing a C app, you can add a built-in library to your project using one of the following methods:

If you are developing a C++ or QML app, you can add a built-in library to your project using one of the following methods:

The following sections list the C libraries that are built in to the BlackBerry 10 Native SDK.

Communication

Bluetooth (libbtapi)

Allows for the integration of Bluetooth capabilities of the device.

API reference Linking command
Bluetooth Library

For C projects, add the btapi library to your project's properties.

For C++/QML projects, add LIBS += -lbtapi to your .pro file.

cURL (libcurl)

Transfers data with URL syntax, including FILE, HTTP, IMAP, POP3, FTP, telnet, and many others.

API reference Linking command
cURL

For C projects, add the cURL library to your project's properties.

For C++/QML projects, add LIBS += -lcURL to your .pro file.

Near Field Communication (libnfcapi)

Provides access to Near Field Communications (NFC) capabilities on the device.

API reference Linking command
Near Field Communication Library

For C projects, add the nfcapi library to your project's properties.

For C++/QML projects, add LIBS += -lnfcapi to your .pro file.

Near Field Communication: BPS Wrapper (libnfc_bps)

Allows apps to connect with Near Field Communications (NFC) systems using the BlackBerry Platform Services (BPS) event framework.

API reference Linking command
Near Field Communication Library

For C projects, add the nfc_bps library to your project's properties.

For C++/QML projects, add LIBS += -lnfc_bps to your .pro file.

Peripheral Discovery (libperipheral_discovery)

Provides capabilities for your apps to receive notifications about the insertion or removal of peripheral devices.

API reference Linking command
Peripheral Discovery Library

For C projects, add the peripheral_discovery library to your project's properties.

For C++/QML projects, add LIBS += -lperipheral_discovery to your .pro file.

Push Service (libPushService)

Provides Push Service notification capabilities.

API reference Linking command
Push Service Library

For C projects, add the PushService library to your project's properties.

For C++/QML projects, add LIBS += -lPushService to your .pro file.

Socket (libsocket)

Provides support for basic sockets and TCP, UDP, and UNIX sockets (DGRAM and STREAM).

API reference Linking command
Socket

For C projects, add the socket library to your project's properties.

For C++/QML projects, add LIBS += -lsocket to your .pro file.

VPN Extensions (libvpn_ext)

Provides the ability to create and manage VPN connections on behalf of the user.

API reference Linking command
VPN Extensions Library

For C projects, add the vpn_ext library to your project's properties.

For C++/QML projects, add LIBS += -lvpn_ext to your .pro file.

Wi-Fi (libwifi)

Provides the ability to determine the current Wi-Fi state and allows for limited control of the Wi-Fi module. In addition, this library supports hotspot aggregator capabilities that allow apps to configure Wi-Fi profiles and connect to hotspots on behalf of the user.

API reference Linking command
Wi-Fi Service Library

For C projects, add the wifi library to your project's properties.

For C++/QML projects, add LIBS += -lwifi to your .pro file.

Data management

Expat (libexpat)

Provides an XML parser.

API reference Linking command
Expat XML Parser

For C projects, add the expat library to your project's properties.

For C++/QML projects, add LIBS += -lexpat to your .pro file.

SQLite (libsqlite3)

Provides a serverless, transactional SQL database engine that you can include in your apps.

API reference Linking command
SQLite

For C projects, add the sqlite3 library to your project's properties.

For C++/QML projects, add LIBS += -lsqlite3 to your .pro file.

XML C parser (libxml2)

Provides a portable XML parsing toolkit.

API reference Linking command
XML C parser

For C projects, add the xml2 library to your project's properties.

For C++/QML projects, add LIBS += -lxml2 to your .pro file.

XML Transforms (libxslt)

Provides Extensible Stylesheet Language Transformation (XSLT) functionality.

API reference Linking command
XSLT C Library

For C projects, add the xslt library to your project's properties.

For C++/QML projects, add LIBS += -lxslt to your .pro file.

Device

Input events (libinputevents)

Provides the ability to receive and process events from input devices.

API reference Linking command
Input Events Library

For C projects, add the inputevents library to your project's properties.

For C++/QML projects, add LIBS += -linputevents to your .pro file.

Ncurses (libncurses)

Provides a terminal-control library for creating textual user interfaces.

API reference Linking command
Ncurses

For C projects, add the ncurses library to your project's properties.

For C++/QML projects, add LIBS += -lncurses to your .pro file.

Sensor (libsensor)

Provides control over the sensors on the device.

API reference Linking command
Sensor Library

For C projects, add the sensor library to your project's properties.

For C++/QML projects, add LIBS += -lsensor to your .pro file.

Graphics and windowing

EGL (libEGL)

Handles graphics context management, surface/buffer binding, and rendering synchronization. It also enables high-performance, accelerated, mixed-mode 2-D and 3-D rendering.

API reference Linking command
EGL

For C projects, add the EGL library to your project's properties.

For C++/QML projects, add LIBS += -lEGL to your .pro file.

EXIF (libexif)

Provides the ability to read and write EXIF meta-information from and to image files.

API reference Linking command
EXIF Library

For C projects, add the exif library to your project's properties.

For C++/QML projects, add LIBS += -lexif to your .pro file.

Fontconfig (libfontconfig)

Provides customized font access.

API reference Linking command
Fontconfig

For C projects, add the fontconfig library to your project's properties.

For C++/QML projects, add LIBS += -lfontconfig to your .pro file.

Fonts (libfonts)

Provides monotype fonts.

API reference Linking command
Not available

For C projects, add the fonts library to your project's properties.

For C++/QML projects, add LIBS += -lfonts to your .pro file.

FreeType2 (libfreetype2)

Provides a high-quality font engine to render text.

API reference Linking command
FreeType

For C projects, add the freetype2 library to your project's properties.

For C++/QML projects, add LIBS += -lfreetype2 to your .pro file.

Glview (libglview)

Provides events-based APIs to more easily develop apps with OpenGL ES 1.1 and OpenGL ES 2.0.

API reference Linking command
Glview Library

For C projects, add the glview library to your project's properties.

For C++/QML projects, add LIBS += -lglview to your .pro file.

Image rendering (libimg)

Provides a common interface for loading and rendering images in various formats, such as GIF, JPEG, PNG, and BMP.

API reference Linking command
Image Library

For C projects, add the img library to your project's properties.

For C++/QML projects, add LIBS += -limg to your .pro file.

JPEG (libjpeg)

Provides the ability to read and write files in JPEG format.

API reference Linking command
JPEG

For C projects, add the jpeg library to your project's properties.

For C++/QML projects, add LIBS += -ljpeg to your .pro file.

OpenGL ES (libGLES_CM, libGLESsoftgl, libGLESv1_CL, libGLESv1_CM, libGLESv2)

Provides the ability to create 3-D objects and stunning animations.

API reference Linking command
OpenGL ES 1.1, OpenGL ES 2.0, and OpenGL ES 3.0

For C projects, add the GLES_CM, GLESsoftgl, GLESv1_CL, GLESv1_CM, or GLESv2 library to your project's properties.

For C++/QML projects, add LIBS += -lGLES_CM -lGLESsoftgl -lGLESv1_CL -lGLESv1_CM -lGLESv2 to your .pro file.

To use OpenGL ES 3.0, add the GLESv2 library.

PNG (libpng, libpng14, libpng16)

Provides the ability to read and write files in PNG format.

API reference Linking command
PNG

For C projects, add the png, png14, or png16 library to your project's properties.

For C++/QML projects, add LIBS += -lpng -lpng14 lpng16 to your .pro file.

Screen Graphics Subsystem (libscreen)

Provides a UI framework for apps to run on the BlackBerry 10 OS.

API reference Linking command
Screen Graphics Subsystem Library

For C projects, add the screen library to your project's properties.

For C++/QML projects, add LIBS += -lscreen to your .pro file.

WordType Layout Engine (libWTLE)

Provides composing, positioning, and rendering of text in multiple languages.

API reference Linking command
Not available

For C projects, add the WTLE library to your project's properties.

For C++/QML projects, add LIBS += -lWTLE to your .pro file.

Messaging

BBM Social Platform (libbbmsp)

Provides access to the social features and functionality of BBM.

API reference Linking command
BBM Social Platform Library

For C projects, add the bbmsp library to your project's properties.

For C++/QML projects, add LIBS += -lbbmsp to your .pro file.

Unified Data Source (libunifieddatasourcec)

Provides functions to integrate your app with the BlackBerry Hub.

API reference Linking command
Unified Data Source Library

For C projects, add the unifieddatasourcec library to your project's properties.

For C++/QML projects, add LIBS += -lunifieddatasourcec to your .pro file.

Monetization

Advertising Service (libbbads)

Provides capabilities to create and customize ad banners in your app, which you can populate with ads sourced from various ad networks.

The BlackBerry Advertising Service will reach its end of life on June 16, 2015. At that time, the servers will be disabled and the Advertising Service APIs will not work.

API reference Linking command
Advertising Service Library

For C projects, add the bbads library to your project's properties.

For C++/QML projects, add LIBS += -lbbads to your .pro file.

Multimedia

Audio (libasound)

Provides access to QNX Sound Architecture (QSA) functionality, which is similar to the Advanced Linux Sound Architecture (ALSA).

API reference Linking command
Audio Library

For C projects, add the asound library to your project's properties.

For C++/QML projects, add LIBS += -lasound to your .pro file.

Audio Manager (libaudio_manager)

Provides functions to get and set properties for audio devices, volume, routing, and concurrency.

API reference Linking command
Audio Manager Library

For C projects, add the audio_manager library to your project's properties.

For C++/QML projects, add LIBS += -laudio_manager to your .pro file.

Camera (libcamapi)

Provides access to the camera on a device to take photos and record video.

API reference Linking command
Camera Library

For C projects, add the camapi library to your project's properties.

For C++/QML projects, add LIBS += -lcamapi to your .pro file.

Camera features (libcamerafeatures)

Provides functions to work with high dynamic range (HDR) photos.

API reference Linking command
Camera Features Library

For C projects, add the camerafeatures library to your project's properties.

For C++/QML projects, add LIBS += -lcamerafeatures to your .pro file.

Multimedia renderer (libmmrndclient, libstrm)

Provides support for developing multimedia apps.

API reference Linking command
Multimedia Renderer Client API

For C projects, add the mmrndclient or strm library to your project's properties.

For C++/QML projects, add LIBS += -lmmrndclient -lstrm to your .pro file.

OpenAL Utility Toolkit (libalut)

Provides access for utilities to work with OpenAL.

API reference Linking command
OpenAL

For C projects, add the alut library to your project's properties.

For C++/QML projects, add LIBS += -lalut to your .pro file.

OpenAL (libOpenAL)

Provides the ability to create and position sounds in the 3-D space of your virtual world.

API reference Linking command
OpenAL

For C projects, add the OpenAL library to your project's properties.

For C++/QML projects, add LIBS += -lOpenAL to your .pro file.

XMP (libxmp)

Provides access to Adobe Extensible Metadata Platform (XMP) technology, which allows you to embed metadata into a file.

API reference Linking command
Not available

For C projects, add the xmp library to your project's properties.

For C++/QML projects, add LIBS += -lxmp to your .pro file.

Platform

Geocoding (libgeo_search)

Provides geocoding and reverse geocoding capabilities.

API reference Linking command
Geocoding Library

For C projects, add the geo_search library to your project's properties.

For C++/QML projects, add LIBS += -lgeo_search to your .pro file.

Geofencing (libgeomonitor)

Provides capabilities to create and monitor virtual perimeters (or regions) for real-world geographic areas.

API reference Linking command
Geofencing Library

For C projects, add the geomonitor library to your project's properties.

For C++/QML projects, add LIBS += -lgeomonitor to your .pro file.

BlackBerry Platform Services (libbps)

Provides event handling and access to BlackBerry Platform Services (BPS) on a device, such as clock, LED, orientation, camera, accelerometer, and so on.

API reference Linking command
BlackBerry Platform Services Library

For C projects, add the bps library to your project's properties.

For C++/QML projects, add LIBS += -lbps to your .pro file.

Gestures (libgestures)

Provides support for the interpretation of gestures on a device.

API reference Linking command
Gestures Library

For C projects, add the gestures library to your project's properties.

For C++/QML projects, add LIBS += -lgestures to your .pro file.

iType (libiType)

Provides support for rendering fonts.

API reference Linking command
iType

For C projects, add the iType library to your project's properties.

For C++/QML projects, add LIBS += -liType to your .pro file.

World Magnetic Model (libwmm)

Provides functions to determine the geomagnetic field with respect to the device's location on Earth.

API reference Linking command
World Magnetic Model Library

For C projects, add the wmm library to your project's properties.

For C++/QML projects, add LIBS += -lwmm to your .pro file.

Security

Credential Manager (libcredential)

Provides access to credential management features, such as password-based or certificate-based credentials.

API reference Linking command
Credential Manager Library

For C projects, add the credential library to your project's properties.

For C++/QML projects, add LIBS += -lcredential to your .pro file.

OpenSSL (libssl)

Provides a full-strength cryptography library to help implement the SSL v2/v3 and TLS v1 protocols.

API reference Linking command
OpenSSL

For C projects, add the ssl library to your project's properties.

For C++/QML projects, add LIBS += -lssl to your .pro file.

Security Builder Engine for OpenSSL (libsbengine)

Allows the use of cryptographic functionality from Security Builder instead of OpenSSL native implementations.

API reference Linking command
Security Builder Engine for OpenSSL Library

For C projects, add the sbengine library to your project's properties.

For C++/QML projects, add LIBS += -lsbengine to your .pro file.

Security Builder Engine Loader (libloadsbengine)

Provides the ability to use the cryptographic functionality from Security Builder instead of OpenSSL native implementations.

API reference Linking command
Security Builder Engine for OpenSSL Library

For C projects, add the loadsbengine library to your project's properties.

For C++/QML projects, add LIBS += -lloadsbengine to your .pro file.

Smart Card (libscs)

Provides access to the smart card functionality on a device.

API reference Linking command
Smart Card Library

For C projects, add the scs library to your project's properties.

For C++/QML projects, add LIBS += -lscs to your .pro file.

Security Builder (libhuapi)

Provides cryptographic support from the BlackBerry 10 Cryptographic Kernel.

API reference Linking command
Security Builder Crypto Library

For C projects, add the huapi library to your project's properties.

For C++/QML projects, add LIBS += -lhuapi to your .pro file.

User interfaces

LBS Core Services (libbbplatformplaces)

Provides APIs for location-based services.

API reference Linking command
Not available

For C projects, add the bbplatformplaces library to your project's properties.

For C++/QML projects, add LIBS += -lbbplatformplaces to your .pro file.

Utilities

bzip2 (libbz2)

Provides a high-quality data compressor.

API reference Linking command
bzip2

For C projects, add the bz2 library to your project's properties.

For C++/QML projects, add LIBS += -lbz2 to your .pro file.

c-ares (libcares)

Provides access to functions for performing asynchronous DNS requests (including name resolution).

API reference Linking command
c-ares

For C projects, add the cares library to your project's properties.

For C++/QML projects, add LIBS += -lcares to your .pro file.

Clipboard (libclipboard)

Provides copy and paste operations to a clipboard.

API reference Linking command
Not available

For C projects, add the clipboard library to your project's properties.

For C++/QML projects, add LIBS += -lclipboard to your .pro file.

Context (libcontext)

Provides instrumentation capabilities for context collection.

API reference Linking command
Not available

For C projects, add the context library to your project's properties.

For C++/QML projects, add LIBS += -lcontext to your .pro file.

Gettext (libintl)

Provides string externalization.

API reference Linking command
Not available

For C projects, add the intl library to your project's properties.

For C++/QML projects, add LIBS += -lintl to your .pro file.

ICU (libicui18n)

Provides Unicode and globalization support.

API reference Linking command
ICU

For C projects, add the icui18n library to your project's properties.

For C++/QML projects, add LIBS += -licui18n to your .pro file.

Identity Service (libids)

Provides the ability to incorporate authentication and authorization using an external identity provider.

API reference Linking command
Identity Service Library

For C projects, add the ids library to your project's properties.

For C++/QML projects, add LIBS += -lids to your .pro file.

iConv (libiconv)

Provides support for converting data from one character encoding to another.

API reference Linking command
libiconv

For C projects, add the iconv library to your project's properties.

For C++/QML projects, add LIBS += -liconv to your .pro file.

Lib Archive (libarchive)

Provides multi-format archive and compression capabilities.

API reference Linking command
Not available

For C projects, add the archive library to your project's properties.

For C++/QML projects, add LIBS += -larchive to your .pro file.

Math (libm)

Provides math functions.

API reference Linking command
Not available

For C projects, add the m library to your project's properties.

For C++/QML projects, add LIBS += -libm to your .pro file.

PackageInfo (libpackageinfo)

Provides access to the BAR application descriptor file metadata.

API reference Linking command
Not available

For C projects, add the packageinfo library to your project's properties.

For C++/QML projects, add LIBS += -lpackageinfo to your .pro file.

Slogger2 (libslog2)

Provides system logging using the Slogger2 service.

API reference Linking command
Slogger2

For C projects, add the slog2 library to your project's properties.

For C++/QML projects, add LIBS += -lslog2 to your .pro file.

Spellcheck (libspellcheck_client)

Provides access to spell check functionality.

API reference Linking command
Spellcheck Library

For C projects, add the spellcheck_client library to your project's properties.

For C++/QML projects, add LIBS += -lspellcheck_client to your .pro file.

String Pattern (libstrpattern)

Provides functions to register strings containing regular expressions, recognizers, and handlers, which perform actions based on those strings.

API reference Linking command
String Pattern Library

For C projects, add the strpattern library to your project's properties.

For C++/QML projects, add LIBS += -lstrpattern to your .pro file.

Universal Compression Library (libucl)

Provides the ability to perform lossless data compression.

API reference Linking command
UCL

For C projects, add the ucl library to your project's properties.

For C++/QML projects, add LIBS += -lucl to your .pro file.

ZIP/GZIP (libz)

Provides a general purpose, lossless data compression library that is supported on many platforms.

API reference Linking command
ZIP/GZIP (zlib)

For C projects, add the z library to your project's properties.

For C++/QML projects, add LIBS += -lz to your .pro file.

ZXing (libzxing)

Provides a 1-D and 2-D barcode image processing library that supports multiple formats and uses the built-in camera to scan and decode barcodes on the device.

API reference Linking command
ZXing

For C projects, add the zxing library to your project's properties.

For C++/QML projects, add LIBS += -lzxing to your .pro file.

Last modified: 2015-04-16



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus