3.8. Creating Libraries

Libraries are files containing commonly used functions needed for all programs. For example, printf() is a function used in most of the C programs. When the program is linked, the linker must know where the code for the printf() function is located. Knowledge of location of library files is a must at this stage. The location can be passed to the linker using command line options or environment variables. In large software projects, this is done inside Makefiles. The environment variable that shows the location of library files is LD_LIBRARY_PATH. Please see the list of command line options in this chapter or use manual pages to find out which options are appropriate.

Get Linux Development Platform: Configuring, Using, and Maintaining a Complete Programming Environment, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.