so_export directive
Syntax
so_export symbol [-> alias][,symbol...];
Parameters
| The name that the symbol will be exported as. |
| The name of a symbol in the shared object to export. Two wildcards can be used:
|
Description
By default, symbols in the shared object are not exported. Use this directive or the ‑‑so_export linker option to export symbols from the shared object.
The ‑‑so_export linker option can only export a named symbol. This directive makes it possible to export symbols under another name, and wildcards can be used in the name of the symbol. In other respects, this directive works exactly the same way as the option.
If wildcards are used, the symbol will not be kept by the linker. You must make sure it is included using one of these options:
Example
so_export mySymbol;
This exports the symbol mySymbol from the shared object, and makes sure that it is included.
so_export myInternal -> myExternal;
The has the effect that the symbol myInternal is kept and will be exported under the name myExternal. (myInternal is the name used inside the shared object, myExternal is the name that everyone outside the shared object will see.)
so_export mp3*;
This exports all publicly visible symbols that begin with mp3. The directive will not include any of them—you must make sure that they are included some other way.