Microsoft KB Archive/112006

= FORTRAN 5.1 Setup Procedure for Typical Installations =

PSS ID Number: 112006

Article Last Modified on 5/5/2001

-

The information in this article applies to:


 * Microsoft FORTRAN Compiler for MS-DOS 5.1

-



This article was previously published under Q112006



SUMMARY
This article describes how to install Microsoft FORTRAN for the most common configurations. This article includes information related to the FORTRAN installation program, which is detailed in other Knowledge Base articles. This article also supplements documents that ship with FORTRAN 5.1.

NOTE: The SETUP command does not fully install Microsoft FORTRAN. Changes must be made to the computer's environment to get full functionality from the FORTRAN compiler. These changes are detailed below.



Before Running SETUP.EXE
To ensure that the setup procedure completes, the TMP environment variable should be set before running SETUP.EXE. If this is not done, Setup may be unable to create the libraries. The TMP environment variable tells the components of FORTRAN where to store temporary data when there is no room in memory (TEMP is used by MS-DOS and Windows for the same purpose). The TMP environment variable must be set to a directory that follows two rules:


 * The directory must exist.
 * The directory should not contain important files.

Microsoft recommends creating a unique directory. At the MS-DOS prompt type:

mkdir tmp

Set the TMP environment variable to point to that directory by typing the following command at the MS-DOS prompt (do not add any extra spaces to this command):

set tmp=c:\tmp

Choices in Running SETUP.EXE
Before Microsoft FORTRAN is installed on your system, you are asked a series of questions regarding your preferences for installation. The following sections make suggestions for your responses to each of the Setup screens. These suggestions are based on the most typical installation of a Microsoft FORTRAN development system. Each of the screens should be read fully before making your selection.

NOTE: You will have a final chance at the end of the questions to go back and make changes if you make a mistake or change your mind.

Host Operating System:

The first choice is for the host operating system. Notice the asterisk ("*") in front of the "DOS" option. When an asterisk is displayed, you must press the SPACEBAR key before pressing the ENTER key to change the selection.

Target Operating System:

The next choice is for target operating system. Again, you must press the SPACEBAR key to change the selection. Pressing the ENTER key without first pressing the SPACEBAR key will not change the selection.

Windows DLL Libraries:

If "DOS and Windows" is chosen, the next question is about DLL libraries. Answering either YES or NO is fine here.

Combined Libraries:

Microsoft recommends that you answer YES to build the combined libraries.

Math Options:

When making your choice, keep in mind that Emulator or 80x87 chip math are equally fast if a math coprocessor is present.

Memory Models:

The large memory model is usually the best choice for FORTRAN.

DOS Graphics Libraries:

Answering NO on this option will still allow full use of graphics in your programs. You will just need to explicitly link to the graphics libraries when you use them.

Error Text:

Answering either YES or NO is fine.

C Compatibility:

Virtually everyone should choose NO for C compatibility. Choosing C compatibility will create incomplete libraries that are incapable of creating FORTRAN programs by themselves (these libraries require linking with libraries from Microsoft C every time you build a program).

Delete Component Libraries:

Microsoft recommends that you answer YES to delete your component libraries to free up space.

Rename Default Libraries:

In most cases, you should choose "Rename DOS libraries".

Programmer's Workbench:

Answering either YES or NO is fine here.

BRIEF Compatibility:

Note that BRIEF compatibility is never required, and therefore Microsoft recommends that you not add BRIEF compatibility.

Mouse Driver:

There have been several revisions and updates to the Microsoft Mouse driver since FORTRAN 5.1. You should not install this version of the Microsoft Mouse driver unless you currently do not have one.

Floating Point Patch:

Most people do not need the PC-DOS 3.2 patch. In most cases you should not install this patch.

Sample Programs:

Answering either YES or NO is fine here.

C Start Up Sources:

The startup sources are rarely used, and therefore the source files may needlessly use space. Microsoft recommends that you not install the C startup sources.

Help Files:

Answering either YES or NO is fine here.

Destination Drive:

The drives and directories to use are up to you. If you have no preference, the default selections are good.

NOTE: If FORTRAN is not hosted on OS/2, then the bound executable files can be put in the ..\BIN rather than the ..\BINB directory. To do this, simply shorten BINB to BIN in the suggested directory name. This will simplify the directory structure allowing a shorter PATH environment variable. This non standard optimization is not required.

Confirm Your Choices:

Examine the selections you have made carefully. After you confirm your choices, SETUP will create the directory structure and build the libraries.

After Running SETUP.EXE
After running the FORTRAN installation program, perform the following three checks to ensure your system is configured properly for FORTRAN.

 Confirm that the CONFIG.SYS file is adequate. CONFIG.SYS should contain the following three lines:

DEVICE=C:\DOS\HIMEM.SYS (or DEVICE=C:\WINDOWS\HIMEM.SYS - the latest version of HIMEM.SYS should be used)

FILES=20 (20 is the minimum)

BUFFERS=10 (10 is the minimum)

  In the AUTOEXEC.BAT file, add the FORTRAN\BIN (and FORTRAN\BINB) directories to the beginning of the PATH environment variable. Add the definitions for the environment variables LIB, INCLUDE, INIT, and HELPFILES immediately after the PATH statement. If the default directories are chosen, the AUTOEXEC.BAT file will look similar to the following:      SET PATH=C:\FORTRAN\BIN;C:\FORTRAN\BINB;C:\DOS; and so on ... SET LIB=C:\FORTRAN\LIB SET INCLUDE=C:\FORTRAN\INCLUDE SET INIT=C:\FORTRAN\INIT SET HELPFILES=C:\FORTRAN\HELP\*.HLP SET TMP=C:\TMP Remember, the TMP directory must be created by you.

NOTE: Your individual PATH statement may be slightly different than the example above. The PATH environment variable (but not the others) can be set three different ways. These three ways are as follows:

SET PATH=C:\FOR....

PATH=C:\FOR....

PATH C:\FOR....

In the AUTOEXEC.BAT file, the following three rules should be followed:

 Shell commands such as the following should be last:

WIN

MENU

DOSSHELL

 Do not add any spaces to the SET commands (no space before or after the equals sign ("=") or at the end of the line). Do not put a semicolon (";") at the end of a line. The PATH and the other environment variables should be defined exactly once.</li></ul> </li> Change to the FORTRAN\INIT directory. There should be a file called TOOLS.PRE, which should be one of the following sizes:

5020 Bytes - FORTRAN installed to target MS-DOS

5024 Bytes - Installed to target MS-DOS and Windows

5028 Bytes - Installed to target MS-DOS, Windows, and Windows DLLs

The TOOLS.PRE file may be slightly larger if OS/2 is also being targeted. However, if TOOLS.PRE is 4907 bytes, it is incomplete. You will need to add the following two lines to the end of TOOLS.PRE:

for_doslibs:default

[pwb-end]

Make a copy of TOOLS.PRE called TOOLS.INI with the MS-DOS command:

copy tools.pre tools.ini<ENTER>

Reboot the computer to complete the FORTRAN 5.1 installation.</li></ol>

Additional Steps for Windows
NOTE: The following steps are not required to create or run QuickWin applications.

If FORTRAN 5.1 is installed with a target of Windows, then a file called SYSTEM.PRE will be created in the Windows directory. This file contains obsolete information and should not used. FORTRAN QuickWin applications can be created and run with no changes to Windows. However, to debug QuickWin applications the following two lines must be added to the [386Enh] section of the SYSTEM.INI file located in the Windows directory:

device=vcv.386

device=c:\fortran\binb\windebug.386

NOTE: Before editing the SYSTEM.INI file, always make a backup copy.

To create an icon for FORTRAN in the Windows Program Manager do the following:


 * 1) Go to Program Manager and choose New from the File menu.
 * 2) Select Program Item and choose OK. This will bring up the Program Item Properties dialog box.
 * 3) In the Description text box, enter FORTRAN, or something similar.
 * 4) Enter PWB.COM in the Command Line text box.
 * 5) The Working Directory text box should contain the directory where you will put most of your work. This could be a directory of your own such as C:\MYWORK, or it could be C:\FORTRAN. The Working Directory should not be C:\FORTRAN\BIN or BINB.

Additional query words: kbinf 5.10

Keywords: KB112006

Technology: kbAudDeveloper kbFORTRAN510DOS kbFortranSearch kbZNotKeyword3

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© 2004 Microsoft Corporation. All rights reserved.