OS/2 Compiling & Linking

Modify or re-write the code in dipos2.c (which is the sample code) and compile and link it in the usual way. The module dip7.obj should be included in the link.

As the OSDI program is a DLL, special command tails are required for compilation with Microsoft C, and in addition the program must be linked with a special library (and the default libraries must be omitted from the link). As the special DLL library is supplied only in large-model form it is recommended that the large model be used. Please refer to the Microsoft compiler manual for further information on using memory models.

Appropriate commands for compiling and linking are:

Microsoft C Large model:

cl -c -ALu -FPa -G3s -Osi -Zelp dipos2.c
link dip7 dipos2,dip7.dll,nul,llibcdll Os2,dip7/nod/noe;