To compile a shared library:
- Compile your source files into an object file, with no linking. For example:
xlc -c foo.c
- Use the -qmkshrobj compiler option to create a shared object from the generated
object files. For example:
xlc -qmkshrobj -o libfoo.so foo.o