You can add a list of libraries (.so or .a files) to search for unsatisfied references. For each item in this list, you can define:
- Name
— the stripped name, the base name without the lib prefix (which ld adds automatically), and without the suffix (.so or .a).
- Type — the library type: Static, Dynamic, Stat+Dyn, or Dyn+Stat (this field is optional because you can let the linker find the first available type). For descriptions about theses types,
see below.
- Use proper variant — A No or Yes in this field indicates whether or not the builder matches the debug or release version of the library with the final binary's
type. For example, if you select Yes and you want to link against a debug version of the library, the IDE appends _g to the library's base name. If you select No, then the builder passes (to ld) the specified name, exactly as you entered it. Therefore, if you want to use a release version of your binary and link against
a debug version of the library, for debug specify Yes.
Note: Adding a new element to the extra library list automatically adds the directory where this library resides to the Extra library paths list (see above), provided that it's path isn't already in the list. However, if you remove an item from the list, its parent
directory is not automatically removed.
You can add a library in three ways: the Add, Project…, and QNX target… buttons.
Shows the additional library to use for given build configuration.
Field descriptions for the External libraries category
-
Name
- The base library without the lib prefix or a suffix.
-
Type
- Show the type for the library: Static (all the functionality of the static library becomes part of your executable), Dynamic (routines are loaded into your application at run time), Stat+Dyn, and Dyn+Stat. To modify the type, select a cell in the Type column, and then click the arrow to select a different type from the dropdown list.
-
Use proper variant
- Indicate whether the matching variant is used for the library, for example, The IDE uses a _g variant if the executable is a _g variant. To modify the type, select a cell in the Use proper variant column, and then click the arrow to select either Yes or No. Note that setting this value appears to create errors with the library names in the common.mk file; however, the qnx_internal.mk that is included with common.mk corrects this problem.
-
Add
- Add a new library by creating an empty element and allowing you to define it manually.
-
Project…
- Add a library project by browsing your workspace for the library. When you add a library from your workspace, the IDE uses
a relocatable notation so other members with different workspace locations can all work successfully without having to make
any project adjustments.
-
QNX target…
- Add a library from an existing QNX target.
-
Delete
- Remove the selected library from the list of extra libraries. The library isn't deleted from the system; only from the list.
-
Up
- Change the order by moving the currently selected library up in the list. Libraries are processed in the order in which they
appear in the list. If a static library references symbols defined in another static library, the library containing the reference
must be listed before the library containing the definition. If you have cross references or circular references, you might
not be able to satisfy this requirement.
-
Down
- Change the order by moving the currently selected library down in the list.