O'Reilly logo

C Programming Essentials by S. K. Bandyopadhyay, K. N. Dey

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix D. Creating Static Library with gcc

A static library is a set of functions, which are resolved in a caller at compile time and copied into a target application by a compiler or linker, producing an object file and a standalone executable. All the predefined functions that we use through header files like stdlib.h are part of static libraries. In this article, we will look into the process of creating such static libraries of our own using the GNU C compiler and related utilities, available both for Linux and Windows[1]. Another feature of a static library is its pre-compiled nature. This enables the programmer to distribute the library without having to include the source files. Think of it as something like the printf() function. We ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required