### Linking

The linker takes object files, links them with each other and with any library files you specify, and produces an executable output file. The executable output can be either an executable program file (extension .exe), a dynamic link library (extension .dll), or a device driver (OS/2 only: extension .sys or .vdd). You can specify the name of the output file with the /OUT linker option.

Input | Output
options | executable file (.exe, .dll)
object files (*.obj) | map file (.map)
static library files (*.lib) | device driver (.sys, .vdd)
import libraries (*.lib) | return code
export files (*.exp) |
resource files (*.res) |

The linker accepts object files compiled or assembled:

- In 32-bit OMF format
- For Windows NT version 3.51 or higher
- For any 32-bit x86 microprocessor

You must enter at least one object file.

You will only need to start the linker explicitly if you compiled with the /C+ option (i.e. compiled without linking). Otherwise, by default, the icc command invokes the linker for you.

Once the compiler has created object modules out of your source files, use the linker to link them together with the IBM C and C++ Compilers runtime libraries to create an .exe file or .dll file.

There are several ways you can start the linker:

- From the command line
- Using response files
- Through the compiler, which automatically invokes the linker
- Through a makefile, which invokes both the compiler and the linker

Summary of Linker Options
Linker Search Rules