Add or remove libraries from a project.
Sébastien Granjoux
seb.sfo@free.fr
Philip Chimento
philip.chimento@gmail.com

# Add or remove new libraries

On Linux, most libraries are packaged to be easily used. When you need one of these libraries, Anjuta provides an easy interface to add it. If the library you need is not one of these, check the Add non-packaged libraries page.

# Add packaged libraries in a new module

A library cannot be added directly to your program; you first need to create a module for it, which is just a group of libraries.

Select the program where you want to add the new library in the project view, click on the right mouse button to make the project context menu appear, and select Add Library. Then click on the New Library button on this dialog.

Or from the main menu, select Project New Library...

You will get a list of all the packaged libraries installed on your system. You can check one or more libraries.

If the library you want does not appear here, perhaps it is because it is not installed on your system. Launch the application you use to install new programs and search for the library name. The package you need often has a "dev" or "devel" suffix and should include header files and a pkg-config file with a .pc extension.

After selecting one library, a module name will be automatically generated but you can change it. When you are done, click on the Add button to create the new module with the selected libraries.

Read the next page to find out how to add this new module to your target.

# Add packaged libraries in an existing module

Select the module where you want to add the new library in the project view, click on the right mouse button to make the project context menu appear and select New Library.

Or from the main menu, select Project New Library...

In the list of all packaged libraries, check the additional libraries wanted. Check that expected module name is selected in the bottom text box. Then click on the Add button to update the module.

Read the next page to find out how to add the module to your target.

# Remove a packaged library from a module

Select the library you want to remove in the project view , click on the right mouse button to make the project context menu appear and select Remove.

Confirm the removal. This library will be removed from the project file.