source: releases/0.5.16/compile_f2c/INSTALL @ 587

Last change on this file since 587 was 586, checked in by andreasw, 13 years ago

sychronized stable/0.5 with trunk rev 585

File size: 1.9 KB
Line 
1The following instructions assume that you already set up Cygwin/Msys
2to know about the Microsoft 'cl' compiler and 'nmake'.
3
41. Download the f2c.exe Fortran to C compiler from netlib from
5
6   http://www.netlib.org/f2c/mswin/f2c.exe.gz
7
8   uncompress it, and put it somewhere in your PATH (e.g. into
9   /usr/local/bin).  Make sure it is executable.
10
112. Download the source code for the f2c runtime library from
12
13   http://www.netlib.org/f2c/libf2c.zip
14
15   and put it into a directory in which you want to have a subdirectory
16   where you want to have the subdirectory "libf2c" containing the
17   runtime library, e.g., into /usr/local/lib.  Uncompress this file,
18   for example by "unzip libf2c.zip" in a Cygwin or MSys window.
19
203. Compile the Fortran runtime library:
21
22   In the source directory (libf2c), type 'nmake -f makefile.vc all'
23
24   If you encounter an error during the compilation of "arithchk.c"
25   (involving the "comptry.bat" file), edit the makefile.vc file and
26   delete the word "comptry.bat" in the 4th from last line.
27
28   NOTE: If you want to generate debug code (using --enable-debug with
29   configure), you need to change the makefile.vc file:  Change the
30   definition of CFLAGS so that it no longer contains '-Ot1' but
31   '-MTd' instead.
32
334. Edit the script "compile_f2c" in this directory so that the
34   variable "f2clibdir" at the beginning is set to the directory
35   containing the libf2c runtime library.  (If you installed it in
36   /usr/local/lib as suggested above, it is already defined correctly.)
37
385. Put the compile_f2c script somewhere into your path, e.g., into
39   /usr/local/bin - make sure it is executable.
40
416. To test it, copy the lines at the end of this file into a Fortran
42   source file (say, bla.f), and type
43
44     compile_f2c -o f2ctest bla.f
45
46   Running the executable f2ctest.exe hopefully makes you happy.
47
48---------------------- 8< ----------------
49
50      program test
51      write (*,*) "It works!"
52      end
Note: See TracBrowser for help on using the repository browser.