4.10.3 User-Defined Libraries
User-defined libraries can be created and linked in with your program. Library files are easier to manage than many source files, and can result in faster compilation times. Libraries must, however, be compatible with the target device and options for a particular project. Several versions of a library might need to be created and maintained to allow it to be used for different projects.
Libraries can be created using the librarian, avr-ar
, (see 5.1 Archiver/Librarian).
Once built, user-defined libraries can be used on the command line along with the source files. Additional libraries can be added to your IDE project, or specified using an option.
Library files specified on the command line are scanned for unresolved symbol before the C standard libraries (but after any project modules), so their content can redefine anything that is defined in the C standard libraries.