Anjuta IDE Manual | ||
---|---|---|
<<< Previous | Setting Compiler Options | Next >>> |
Libraries are external modules that must be linked with your program at the final stage of the build, to produce another library or an executable. The linker is passed the list of libraries to link with to construct the final target.
It is also possible to provide the names of object modules (*.o files) along with the libraries to link against. Object modules are specified by a special flag (asterisk *) at the start of the object module name (so that Anjuta can differentiate them from the library modules). Object modules must be listed with their full paths (absolute or relative, depending upon the context), because they will not be searched for on the library search path.
Example: in the screenshot below, the first entry "scintilla" is a library, while those starting with "*" are object modules.
Libraries follow the naming format: libXXX.a. When specifying libraries in the list, the prefix "lib" and the suffix ".a" are skipped, and only the library name "XXX" is given in the entry.
To set libraries for your program:
Choose the menu item Settings->Compiler and Linker Settings … and click on the Libraries tab in the Compiler Options dialog.
Enter each of the library names (and object names, if required) and click on the Add button for each entry.
Libraries can also be selected from the list shown in the right pane of the dialog. Not all libraries will be available in this list.
![]() | Remember |
---|---|
Object modules must be specified with an explicit path and must start with an asterisk (*). |
To remove an entry, select the entry in the list and click on Remove.
To disable an entry, double-click on the entry in the list. To re-enable it, double-click again.
Entries that are disabled are not included in the the linking process.
To edit an entry, select the entry, modify it in the text box and click on Update
To clear all of the entries, click on Clear.
<<< Previous | Home | Next >>> |
Library Paths | Up | Defining Macros |