Setting Search Paths in the Console

When the command console session begins, the search paths for libraries, module files, and so forth are those set for your user account on the PC. On Windows 98, Windows Me, and Windows 95 systems, these paths are initially specified in the AUTOEXEC.BAT file that is read when the computer is booted.

By default, Windows NT 4 and Windows 2000 systems use a file called AUTOEXEC.NT to perform initialization of console sessions, but you can specify your own initialization file for the command console with the PIF Editor. (See your operating system manual for more details about the PIF Editor.)

You can use the SET command to change these search paths manually within the console session, but your changes will only be in effect during that session. If you need to specify certain path changes each time you begin a console session, you can put the SET commands into a batch file and run it when you begin a session. The Setup program provides a batch file called DFVARS.BAT for this purpose. You can add your SET commands to this file and run it at the start of each session.

You can run DFVARS.BAT:

The instructions specify the PATH, INCLUDE, and LIB environment variables. For example, the lines in the batch file that sets the INCLUDE environment variable include:

   set LIB=%DFcdrom%\DF98\LIB;%DFcdrom%\VC98\LIB;%LIB%

The batch file inserts the directories used by Visual Fortran at the beginning of the existing paths. Because these directories appear first, they are searched before any directories in the path lists provided by Windows. This is especially important if the existing path includes directories with files having the same names as those needed by Visual Fortran.

As described in "Using the Command-Line Interface" in Compaq Visual Fortran Installing and Getting Started, the Fortran Command Prompt window sets these variables for you automatically. To activate this command window, select the Fortran Command Prompt icon in the Compaq Visual Fortran program folder.