LIB /EXPORT

Syntax

/export:entryname[[,]=internalname][,@ordinal[,NONAME]][,attribute]

The entryname is required. Subsequent arguments are optional. A slight variation is permitted of the standard parsing in terms of arguments separated by commas. An equals sign is accepted as a separator at the end of the entryname only. As parsing proceeds, each occurrence of a comma (and the first occurrence of an equals sign) is expected to introduce another argument. If instead the comma or equals sign ends the option, a warning is given (LNK4051).

If the argument after entryname begins with an equals sign, it introduces an internalname. The equals sign that introduces the internalname is itself accepted as a separator, so that the comma is optional.

If the next argument begins with an @ sign, it introduces an ordinal. There may be any amount of white space between the @ and the ordinal. The ordinal is interpreted as a decimal number, with a sign prefix permitted, evaluated as an unsigned integer truncated to 32 bits. It is a fatal error (LNK1119) if the ordinal is not in this form or is non-zero or is not less than 64K. Non-numerical characters immediately after the ordinal are ignored without complaint.

If an ordinal is given, the next argument may be the keyword NONAME. It is a fatal error (LNK1161) if the argument starts as NONAME but continues (with anything but a comma, to introduce another argument).

If there is another argument, it must be acceptable as the attribute. The permitted keywords are DATA and PRIVATE. Anything else is a fatal error (LNK1161). Given a valid attribute, excess arguments are ignored without complaint.