What\'s .a files in C programming in linux ? Is it library file ?
To merge with the math library libm.a you would type
cc -o program_name prog.c -lm
when you
.a
files are static libraries, as opposed to .so
files which are dynamic libraries. Normally gcc looks for dynamic libraries if available unless passed -static
.
The header contains definitions that the compiler needs in order to build the source code into an object file, but the libraries contain the actual routines that the linker needs to turn the object file into an executable.