Compiling and Debugging
Related links
- Making your code more portable
To help you create portable applications, BlackBerry PlayBook OS lets you compile for specific standards and include OS-specific code.
- Header files in /usr/include
The ${QNX_TARGET} /usr/include directory includes at least the following subdirectories (in addition to the usual sys):
- Using libraries
When you're developing code, you almost always make use of a library — a collection of code modules that you or someone else has already developed (and hopefully debugged). Under Neutrino, we have three different ways of using libraries:
- Linking your modules
To link your application against a library, use the -l option to qcc, omitting the lib prefix and any extension from the library's name. For example, to link against libsocket, specify -l socket.
- Optimizing the runtime linker
The runtime linker supports the following features that you can use to optimize the way it resolves and relocates symbols:
- Debugging
Now let's look at the different options you have for debugging the executable. Just as you have two basic ways of developing (self-hosted and cross-development), you have similar options for debugging.
- Debugging using libmudflap
QNX includes support for Mudflap through libmudflap. Mudflap provides you with pointer checking capabilities based on compile time instrumentation as it transparently includes protective code to potentially unsafe C/C++ constructs at run time.