source: trunk/compile_f2c/INSTALL @ 332

Last change on this file since 332 was 325, checked in by andreasw, 14 years ago

added compile_f2c tool to compiler Fortran source with f2c and MSVC compiler; a few fixes to Cygwin

File size: 1.7 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
284. Edit the script "compile_f2c" in this directory so that the
29   variable "f2clibdir" at the beginning is set to the directory
30   containing the libf2c runtime library.  (If you installed it in
31   /usr/local/lib as suggested above, it is already defined correctly.)
32
335. Put the compile_f2c script somewhere into your path, e.g., into
34   /usr/local/bin - make sure it is executable.
35
366. To test it, copy the lines at the end of this file into a Fortran
37   source file (say, bla.f), and type
38
39     compile_f2c -o f2ctest bla.f
40
41   Running the executable f2ctest.exe hopefully makes you happy.
42
43---------------------- 8< ----------------
44
45      program test
46      write (*,*) "It works!"
47      end
Note: See TracBrowser for help on using the repository browser.