Compiling a static library
To compile a static library, follow this procedure:
- Compile each source file to
get an object file.
For example:
xlc -c test.c example.c - Use the ar command to add the generated
object files
to an archive library file. For example:
ar -rv libex.a test.o example.o