Environment Variables for CL.exe and Link.exe (Windows CE 5.0)
The compilers for the Windows CE target architectures, all named cl.exe, invoke the preprocessor and compiler. Link.exe invokes the linker. The compiler can invoke the linker as well, so you do not need to invoke Link.exe directly in most cases.
In the BIN folder for each version of the Windows CE OS, there is a subdirectory for each target architecture (x86, ARM, MIPS, and SH) that contains the target-specific executable.
The compilers and LINK require that certain environment variables be properly set, as explained here:
- Cl.exe uses CL, _CL_, and INCLUDE.
- CL, if defined, prepends arguments to the driver command line.
- _CL_, if defined, appends arguments to the command line.
- INCLUDE points to the \include subdirectory of your Visual C++ installation.
- Link.exe uses LINK, LIB, PATH, and TMP.
LINK, if defined, prepends arguments in the command line.
LIB, if defined, specifies the path that the LINK tools use 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 is used if the tool must run CVTRES and cannot find the file in the same directory as LINK. (LINK requires CVTRES to link a .res file.) PATH must point to the \bin subdirectory of your Visual C++ installation.
TMP is used to specify a directory when linking OMF or .res files.
See Also
Compiler and Linker Build Options | Compiler Command Line Options | Setting the CL Environment Variable | Linker Options
Send Feedback on this topic to the authors