mkshrobj

Applies to C Applies to C++

Purpose

Creates a shared object from generated object files.

Syntax

Notes

This option, together with the related options described below, is used to create a shared object. The advantage to using this option is that the compiler will automatically include and compile the template instantiations in the tempinc directory.

Specifying -qmkshrobj implies -qpic.

Also, the following related option can be used with the -qmkshrobj compiler option:

-o shared_file Is the name of the file that will hold the shared file information. The default is a.out.

If you use -qmkshrobj to create a shared library, the compiler and linker are called with the appropriate options to build a shared object.

Example

To construct the shared library big_lib.o from three smaller object files, type:

xlc -qmkshrobj -o big_lib.o lib_a.o lib_b.o lib_c.o

Related References

Compiler Command Line Options
32, 64
e
lib
o
path
pic
priority
#pragma priority

See also Creating a Library. IBM Copyright 2003