Compiling your DLL code

For C source, compile with the DLL compiler option. When you specify the DLL compiler option, the compiler generates special code when calling functions and referencing external variables. Even if a simple application or DLL does not reference any imported functions or imported variables from other DLLs, you should specify the DLL compiler option. Compiling an application or DLL as DLL code eliminates the potential compatibility problems that may occur when binding DLL code with non-DLL code.

Compiling your C source with the XPLINK compiler option will automatic generate DLL-enabled code, so in this case the DLL compiler option is not necessary.

For C++ source, compile as you would any C++ program.

For COBOL source code that defines DLLs, compile with the RENT, DLL and EXPORTALL compiler options. For source code that only references DLLs, compile with the RENT, DLL, and NOEXPORTALL compiler options.

For Enterprise PL/I source, you must compile with the RENT option.

For Assembler source, you must use the GOFF option.

Note: DLLs must be reentrant; you should use the RENT C compiler option. (C++ is always reentrant).