Adding Libraries and Library Search Paths

In the project properties, you must define all the libraries that you use in your application, as well as their search paths. The libraries required for using bada APIs are listed under Remarks in the C++ API Reference. The default bada library, FOsp, is added automatically to the list of libraries by the Application Wizard, but you need to add the other libraries manually.

For example, if your application uses OpenGL® ES, you must include FGraphicsOpengl and FGraphicsEgl in the library list as shown under Remarks.

Figure: Required libraries in the C++ API Reference

Required libraries in the C++ API Reference

If you use any external libraries in your application in addition to those included in the bada SDK, you also need to define these libraries and their search paths in the application project properties. You can store the static libraries anywhere in the file system of your computer.

Adding Linked Libraries

To add linked libraries and their search paths:

  1. In the Properties window, select C/C++ Build > Settings.

  2. From the Configuration drop-down list, select the Target-Debug or Target-Release configuration.

  3. In the Tool Settings tab, select bada C++ Linker > Miscellaneous.

  4. Define the libraries to be used under Other objects.

  5. To save the settings, click Apply.

Adding Shared Libraries

To add shared libraries and their search paths:

  1. In the bada IDE Project Explorer, add a lib folder in your application project.

  2. Copy the shared libraries to the newly created lib folder.

    When you add the shared libraries to the target device, the file name of the libraries must start with lib, for example, libLIBRARY.so.

    To use the shared libraries in the Emulator, also copy them to the \<BADA_SDK_HOME>\Model\<Device_model>\Emulator folder.

  3. In the Properties window, select C/C++ Build > Settings.

  4. From the Configuration drop-down list, select the appropriate build configuration.

  5. In the Tool Settings tab, select bada C++ Linker > Libraries.

  6. Add the shared libraries to be used under Libraries (-l).

    Add the library names without prefix and file extensions, for example, LIBRARY.

  7. Check whether the default library path ${PROJECT_ROOT}/lib exists under Library search path (-L). If not, set the newly created lib folder as the search path.

  8. To save the settings, click Apply.

Where to Go Next