LINK Environment Variables

The LINK tool uses the following environment variables:

  • LINK and _LINK_, if defined. The LINK tool prepends the options and arguments defined in the LINK environment variable and appends the options and arguments defined in the _LINK_ environment variable to the command line arguments before processing.

  • LIB, if defined. The LINK tools uses the LIB path when searching for an object, library, or other file specified on the command line or by the /BASE option. It also uses the LIB path to find a .pdb file named in an object. The LIB variable can contain one or more path specifications, separated by semicolons. One path must point to the \lib subdirectory of your Visual C++ installation.

  • PATH, if the tool needs to run CVTRES and cannot find the file in the same directory as LINK itself. (LINK requires CVTRES to link a .res file.) PATH must point to the \bin subdirectory of your Visual C++ installation.

  • TMP, to specify a directory when linking OMF or .res files.

See Also

Setting Linker Options
Linker Options
Build C/C++ code on the command line
Set the Path and Environment Variables for Command-Line Builds