All DLLs must be in a directory listed in the PATH environment variable.
To link with a DLL, include the import library (.lib) file for the DLL on the linker command line. The linker uses the import library to resolve references made from your application to the DLL.
Write the source files that are to access your DLL as if the functions and/or variables are to be statically linked at compile time. Then when you link the program, you must inform the linker that some function and/or variable references are to a DLL and will be resolved at run time. To communicate this information to the linker:
If you do not have a library file, you can use ILIB to first generate a module definition file. Verify and edit the entries in the module definition file, then use ILIB with it to generate a library file.
If you invoke the linker directly, give the name of the import library where you normally specify library names. For example:
ILINK /DLL mymain.obj finaldll.lib
If you invoke the linker through the icc command, you must put the name of the import library in the compiler invocation string. For example:
icc /Ge- mymain.obj finaldll.lib
The import libraries for the IBM C and C++ Compilers runtime DLLs have been supplied with the compiler.