Temporary files created by the compiler or linker reside in the directory used by the operating system to store temporary files.
To store temporary files, the driver first checks for the TMP environment variable. If defined, the directory that TMP points to is used to store temporary files.
If the TMP environment variable is not defined, the driver then checks for the TMPDIR environment variable. If defined, the directory that TMPDIR points to is used to store temporary files.
If the TMPDIR environment variable is not defined, the driver then checks for the TEMP environment variable. If defined, the directory that TEMP points to is used to store temporary files.
For Windows*, if the TEMP environment variable is not defined, the current working directory is used to store temporary files. For Linux* and Mac OS*, if the TEMP environment variable is not defined, the /tmp directory is used to store temporary files.
Temporary files are usually deleted.
For performance reasons, use a local drive (rather than a network drive) to contain temporary files.
To view the file name and directory where each temporary file is created, use the -watch all (Linux and Mac OS) or /watch:all (Windows) option.
To create object files in your current working directory, use the -c (Linux and Mac OS) or /c (Windows) option.
Any object files that you specify on the command line are retained.