Building DLLs
Except for the object modules you require for creating the DLL, you do not require additional object modules. The prelinker automatically creates a definition side-deck that describes the functions and the variables that DLL applications can import.
When you build a DLL, the prelinker creates a definition side-deck, and associates it with the SYSDEFSD ddname. You must provide the generated definition side-deck to all users of the DLL. Any DLL application which implicitly loads the DLL must include the definition side-deck when they prelink.
IMPORT CODE 'BASICIO' bopen
IMPORT DATA 'BASICIO' bclose
IMPORT DATA 'BASICIO' bread
IMPORT DATA 'BASICIO' bwrite
IMPORT DATA 'BASICIO' berror
You can edit the definition side-deck to remove any functions or variables that you do not want to export. For instance, in this example, if you do not want to expose function berror, remove the control statement IMPORT DATA 'BASICIO' berror from the definition side-deck.
IMPORT CODE 'TRIANGLE' getarea__8triangleFv
IMPORT CODE 'TRIANGLE' getperim__8triangleFv
IMPORT CODE 'TRIANGLE' __ct__8triangleFv
You can edit the definition side-deck to remove any functions and variables that you do not want to export. For instance, in this example, if you do not want to expose getperim(), remove the control statement IMPORT CODE 'TRIANGLE' getperim__8triangleFv from the definition side-deck.
The definition side-deck contains mangled names, such as getarea__8triangleFv. If you want to know what the original function or variable name was in your source module, look at the compiler listing created. Alternatively, use the CXXFILT utility to see both the mangled and demangled names. For more information on the CXXFILT utility, see Filter utility.
The prelinker NODYNAM option must not be in effect when building DLLs.
Linking your code
When you link your code, ensure that you specify the RENT or REUS(SERIAL) options.