|Please note that this version does not run under Windows XP and does not come with a library (beyond the intrinsics). It is therefore highly recommended that you use instead the 1999 version, which can be downloaded from this page.|
The needed files are less than 1.44MB each:
Next, run MS-DOS (using
Start | Programs | Command Prompt) and
type the following:
cd \Fortran pkunzip -d g77dos.zip pkunzip -d g77doc.zip cd EMXIf you get an error message (e.g.
Path not found) after the first command, then you haven't created the
Fortranfolder under the root (but perhaps under desktop or some other folder). And if you get an error message after the 2nd or 3rd command (e.g.
File not found), then you haven't downloaded the files into the
Fortranfolder. Finally, if you get an error message (e.g.
Path not found) after the 4th command, then you forgot the
-dswitch of the pkunzip command. In all these cases, repeat the above steps.
Next, we need to make changes to a couple of environment variables, and this depends on your operating system:
autoexec.batfile, which is stored in the root directory of your hard disk; i.e.
\. Hence, you need to edit this file and add to the two lines:
SET LIBRARY_PATH=\FORTRAN\EMX\LIB PATH=%PATH%;\FORTRAN\EMX\BINTo do that, go to the MS-DOS command prompt and type the commmand
edit \autoexec.batand, regardless of what already exists in the file, add the above two lines at the end. Then, use the File menu to Exit, confirming that you do want the changes saved.
Control Paneland set their values to the ones shown:
variable value LIBRARY_PATH \FORTRAN\EMX\LIB PATH %PATH%;\FORTRAN\EMX\BIN
exit) and then restart your computer (to allow these changes to take effect).
This almost completes the installation procedure. To facilitate using the compiler, however, the following three files, albeit not essential, are very helpful as they shorten the invocation command, redirect the error messages, if any, to the screen, and pause after a screenful of errors:
\fortran\emx\bin. You can now invoke the compiler to compile a program like Test.FOR using the command: fcomp test or the command: fcomp2 test (fcomp stands for Fortran Compile). Note that you no longer need to specify neither the free-form switch nor the .for extension.
If you are new to Fortran, go through the 12 on-line Labs; otherwise, use the Guide as a quick reference. Both are available from this site.
The text files in the EMX directory give a detailed reference to the language. Note, in particular, that: