Questions tagged [f2c]

f2c is the name of a program to convert Fortran 77 to C code, developed at Bell Laboratories.

f2c is the name of a program to convert Fortran 77 to C code, developed at Bell Laboratories.

See https://en.wikipedia.org/wiki/F2c

19 questions
0
votes
1 answer

Error in linking when converting Fortran to C (using f2c)

I'm trying to build a project that is mostly C but has some Fortran subroutines. The code is old and I'm trying to make it work on modern machines. My main function calls an external function extern void __stdcall mainlhs(void); The function is a…
jzlas
  • 187
  • 2
  • 11
0
votes
1 answer

Syntax error on line if (m <= 0 .or. n <= 0) return

When I compile the following file with f2c, it fails with a noninformative syntax error message f2c < ../../libcruft/blas-xtra/ddot3.f >ddot3.c ddot3: Error on line 37: syntax error gfortran compiles it without any error. Do you have an idea…
user7610
  • 25,267
  • 15
  • 124
  • 150
0
votes
1 answer

How to stop f2c from printing names of each subroutine and function

Our build scripts run f2c over several thousand subroutines and functions, so our build output consists of large amounts of output like: a102: a200: a210: acalc: actdis: addvec: adhydr: alsun: We are running f2c version…
Clare Macrae
  • 3,670
  • 2
  • 31
  • 45
-1
votes
1 answer

Fortran/C Unformatted Binary File on Windows/iOS

I have a Fortran program that I used f2c to convert to C because I need to run it on iOS so this would be my only option. The program relies on file reading and writing, specifically it generates an unformatted binary file that it later reads from…
ez4nick
  • 9,756
  • 12
  • 37
  • 69
1
2