You also can create an import library for your DLL. If you do this, you can link applications with your DLL without explicitly declaring the imports for each application. OS/2 uses this technique for the application programming interface (API). When you link your applications with OS2386.LIB, you are using an import library.

To create the import library STRINGS.LIB from MYPUTS.DLL, you use the Import Library Manager (IMPLIB), as shown below.

    implib strings.lib myputs.def

You then can link your applications with STRINGS.LIB to resolve references to the myPuts function, as shown below.

    link386 /noi useputs, , nul, strings;

A module-definition file for USEPUTS.C is optional in this example because we are linking with an import library.


[Back] [Next]