The following table shows the compile-time environment variables that affect the Intel®Fortran
Compiler:
Description Environment
Variable
Specifies a configuration file that the compiler should use instead of the default configuration file.
IFORTCFG
By default, the compiler uses the default configuration file (ifort.cfg) from the same directory where the compiler executable resides.
NOTE. On Windows* operating systems, this environment variable
cannot be set from the IDE.
Specifies the location of the product license file.
INTEL_LICENSE_FILE
Specifies the directory path for the compiler executable files.
PATH
Specifies the directory in which to store temporary files. SeeTemporary Files Created by the Compiler or Linker.
TMP,TMPDIR,
TEMP
NOTE. On Windows operating systems, this environment variable
cannot be set from the IDE.
The path for include and module files.
FPATH
(Linux* OS and Mac OS* X)
Description Environment
Variable
Specifies the location of the gcc binaries. Set this variable only when the compiler cannot locate the gcc binaries when using the -gcc-name option.
GCCROOT
(Linux OS and Mac OS X)
The location of the gcc headers. Set this variable to specify the locations of the GCC installed files when the compiler does not find the needed values as specified by the use of -gcc-name=directory-name/gcc.
GXX_INCLUDE
(Linux OS and Mac OS X)
The location of the gcc binaries. Set this variable to specify the locations of the GCC installed files when the compiler does not find the needed values as specified by the use of -gcc-name=directory-name/gcc.
GXX_ROOT
(Linux OS and Mac OS X)
The path for libraries to be used during the link phase.
LIBRARY_PATH
(Linux OS and Mac OS X)
The path for shared (.so) library files.
LD_LIBRARY_PATH
(Linux OS)
The path for dynamic libraries.
DYLD_LIBRARY_PATH
(Mac OS X)
Specifies the directory path for the include files (files included by an INCLUDE statement, #include files, RC INCLUDE files, and module files referenced by a USE statement).
INCLUDE
(Windows OS)
Specifies the directory path for .LIB (library) files, which the linker links in. If the LIB environment variable is not set, the linker looks for .LIB files in the current directory.
LIB(Windows OS)
Additionally, there are a number of run-time environment variables that you can set. For a list of environment variables recognized at run time and information on setting and viewing environment variables, seeSetting Run-Time Environment Variables.
You can use theSETcommand at the command prompt to set environment variables. Depending on your operating system, there are additional ways to set environment variables.
Setting Environment Variables (Linux OS and Mac OS X)
You can set environment variables by using theifortvars.cshandifortvars.shfiles to set several at a time. The files are found in the product'sbindirectory. SeeUsing the ifortvars File to Specify Location of Components.
Within the C Shell, use the setenv command to set an environment variable:
setenv FORT9 /usr/users/smith/test.dat
To remove the association of an environment variable and its value within the C shell, use the
unsetenvcommand.
unsetenv FORT9
Within the Bourne* shell (sh), the Korn shell (ksh), and the bash shell, use the export command and assignment command to set the environment variable:
export FORT9
FORT9=/usr/users/smith/test.dat
To remove the association of an environment variable and its value within the Bourne* shell, the Korn shell, or the bash shell, use the unset command:
unset FORT9
Setting Environment Variables (Windows OS)
Certain environment variables specifying path, library, and include directories can be defined in the IDE on a per user basis using Tools>Options... from the menu bar.
Additionally, you can set the environment variables needed by Intel Fortran using the
ifortvars.batfile. SeeUsing the ifortvars File to Specify Location of Components.
NOTE. If you specifydevenv/useenvon the command line to start the IDE, the IDE uses the PATH, INCLUDE, and LIB environment variables defined for that command line when performing a build. It uses these values instead of the values defined using Tool>Options.
For more information on thedevenvcommand, see thedevenvdescription in the Microsoft Visual Studio* documentation.
During installation, the Intel Fortran compiler may modify certain system-wide environment variables, depending on your installation choices. (For more information, see the install.htm file.)
On Windows* 2000, Windows NT* 4, or Windows XP* operating systems:
1.Log into an account with Administrator privilege.
2.Open the Control panel.
3.Click System.
4.On Windows 2000 and Windows XP systems: Click the Advanced tab and then click the Environment Variables button. On Windows NT 4 systems: Click the Environment tab.
5.View or change the displayed environment variables.
6.To have any environment variable changes take effect immediately, click Apply.
7.Click OK.
NOTE. Changing system-wide environment variables affects command line builds (those
done without IDE involvement), but not builds done through the IDE. IDE builds are managed by the environment variables set in the IDE Using Tools>Options. An exception to this is an IDE build (devenv) done from the command line that specifies the/useenv
option. In this case, the IDE uses the PATH, INCLUDE, and LIB environment variables defined for that command line.
You can set an environment variable from within a program by calling the SETENVQQ routine. For example: USE IFPORT LOGICAL(4) success success = SETENVQQ("PATH=c:\mydir\tmp") success = & SETENVQQ("LIB=c:\mylib\bessel.lib;c:\math\difq.lib")