bstatic, bdynamic, bshared

Option Type Default Value #pragma options C C++
-flag bdynamic - x x

Syntax

    -bstatic | -bdynamic | -bshared

Purpose
Controls how shared objects are processed by the linkage editor.

Suboptions

bdynamic,bshared Causes the linker to process subsequent shared objects in dynamic mode. This is the default. In dynamic mode, shared objects are not statically included in the output file. Instead, the shared objects are listed in the loader section of the output file.
bstatic Causes the linker to process subsequent shared objects in static mode. In static mode, shared objects are statically linked in the output file.

The default option, -bdynamic, ensures that the C library (lib.c) links dynamically. To avoid possible problems with unresolved linker errors when linking the C library, you must add the -bdynamic option to the end of any compilation sections that use the -bstatic option.

For more information about this and other ld options, see your AIX system documentation.



List of Batch Compiler Options and Their Defaults
Options that Specify Linkage Options
Equivalent Batch Compile-Link and Incremental Build Options