### Create a Resource DLL (OS/2)

1. Create an empty source file, i.e., with no code, no declarations etc. The file must be empty because it is being included in a resource DLL, which can contain only resources.
2. Create a resource script (.rc) file that defines your resources.
3. Compile the source file using /C+ to compile without linking. For example:

           icc  /C+ empty.c

   Do not specify the /Ge- option. /Ge- causes the DLL initialization and termination code to be included in the DLL.

4. Link the resulting object module, using your module definition file, to create an empty DLL:

            ILINK empty.obj /DLL /OUT:resdll.dll

5. Compile your .rc file with the Resource Compiler to create a .RES file. For example:

          RC /r myres.rc

6. Use the Resource Compiler again to add the resources to the DLL. For example:

          RC myres.res resdll.dll

Your application can use the operating system API to load the resource DLL and access the resources it contains. Like other DLLs, resource DLLs must be in a directory specified in your LIBPATH environment variable or in BEGINLIBPATH or ENDLIBPATH, which prepend and append their contents to LIBPATH.

Resource DLLs

Resource Compiler - An Overview