As noted in Dynamic Linking, Presentation Manager resources may be defined and stored in a DLL for use by multiple applications. However, the implementation of dynamic linking under OS/2 requires that each DLL must contain an executable module, and resources are not executable modules in their own right. If a DLL will contain only resources and will not contain an executable routine such as a dialog procedure, a dummy executable module must be provided for the DLL by the application developer, as shown below:
int ARCTUSED = 1; void EXPENTRY dummy() { }
The declaration for the variable ARCTUSED is provided in order to avoid an error generated by the IBM C/2 compiler when it cannot find a module named main within the source file.
Editor's Note: The above statement may not be true for the C Set/2 compiler. This must be determined.
This dummy module is compiled and link-edited into an executable file in the normal way. The resource compiler is then used to compile and incorporate the resource definitions into the executable file.