exportList Link Option

Syntax: Default:
link(exportList, fileName) none

This option names a file containing specifications for symbols to be exported from the target module. If you are building a DLL or shared library, you can use this option to make symbols visible to other modules that use them.

For modules build from C++ source code, the options link(exportAll), link(export_NameSpace, name), and link(export_Prefix, prefix) are easier to use than link( export, ...) or link(exportlist, ...), but give you less flexibility.

You can specify just the names of symbols to export in the export file the you use with this option. Optionally, you can specify some or all the parameters described in the table below. The only way to apply the optional parameters to exported symbols is to use this option or link(export, ...).

You must prepare the file before processing the configuration file. Therefore, you may want to consider alternative methods of exporting symbols from a DLL or shared library.

The file must be formatted as one or more lines, each of which has one of the following two forms.

  1. You can put a comment line anywhere. This diagram shows the syntax of a comment line:
  2. An export specification must fit on one line. This diagram shows the syntax of an export specification:

You can insert whitespace anywhere there is a blank in the text above. The parameters of an export specification are as follows:

parameter meaning
external_name This string is the name by which the symbol is known to other modules.
internal_name This string is the actual name of the function or data item as it appears within the DLL or shared library. By default this is the same as the external name.
If the name is defined in a C++ module and is not declared with extern "C" linkage, this must be the mangled name.
On Windows, the name must be in decorated form.
ordinal This number specifies the function's ordinal position within the module definition table. The value of ordinal must be in the range 1 to 65,535. If you supply an ordinal number, the symbol can be referred to when it is imported by either its external name or its ordinal value.
ordinal is ignored.
RESIDENTNAME

or

NONAME

RESIDENTNAME tells OS/2 to keep the name of the symbol resident in memory at all times. You can specify this only if you also supply an ordinal. If you do not supply an ordinal, OS/2 keeps the name memory-resident by default.
RESIDENTNAME is ignored .

NONAME removes the name of the function from the symbol table on Windows. You can specify this only if you also supply an ordinal, because the function can be located only by ordinal number.
NONAME is ignored.

numWords

or

CONSTANT

The number specifies the number of 2-byte words required to store the function parameters on OS/2 and is used only for symbols in sections with I/O privilege. This number is ignored in sections that are not IOPL. You can specify IOPL with link(code,attributes) or link(section, name, attributes).
This number is ignored.

CONSTANT is ignored.
Use CONSTANT on Windows when the exported symbol is the name of a data item. Do this to avoid inappropriate symbol resolution when linking to a module that does not declare the data reference as an import.



Incremental C++ Builds
C Compilation
Configuration Files
Decorated and Mangled Names


Set Build Options
Build
Build a Dynamic Link Libraries
Export Symbols from a DLL
Get Mangled Names for C++ Symbols


Link Options
Link Options