I tried with various Fortran compilers including g77 (constant overflow)bob wrote:The main issue is that the internal assumption is that integer == 64 bits. If the compiler can deal with that in a 32 bit machine, it will work. Otherwise, this will be a problem. The intel C compiler for linux is free and works just fine, and the included make file will compile cleanly...Dann Corbit wrote:F2c needs the Fortran I/O libraries.Carey wrote:Thanks for making an effort on this... Better you than me!Zach Wegner wrote:Damn, this is harder than I thought. I've been fiddling around with g77 and f2c for a while, but neither worked. The f2c option seems closer to working.![]()
I had some idea how much time it'd take, which is why I told him it'd be at least a couple days before I could even try.
I've seen the kind of output f2c produces. Along with Pascal to C converters and other '-to-c' converters.I will warn you though that the f2c output is _hideous_, so I wouldn't bet on the C version being any easier to get to work. I think most library calls aren't translated to C anyways, but rather handled by a library.
Hideous is definetly the right word.
Hmmm.... Odd.Anyways, for f2c, it appears that there are a bunch of library functions missing, as the linker goes crazy with undefined reference errors like these:Right now I'm going to try out the Intel fortran compiler. I don't have Linux, but I hope my Linux emulation is up to the task...Code: Select all
asyncio.c:(.text+0xa): undefined reference to `s_rsfe' asyncio.c:(.text+0x1e): undefined reference to `do_fio' asyncio.c:(.text+0x23): undefined reference to `e_rsfe' asyncio.c:(.text+0x44): undefined reference to `s_stop
I would certainly expect it to include all the library files it'd need. Maybe the current build has some Windows issues.
You get it here:
http://www.netlib.org/f2c/
Get file http://www.netlib.org/f2c/libf2c.zip
Don't just get the binaries because you might want to do 64 bit builds and the binaries only have 32 bit libraries.
G95 and GFortran (64 bit versions) failed, so I tried:
implicit integer(16) (a-z)
instead of
implicit integer (a-z)
but then I get function call errors.
I guess that only Intel Fortran can handle it without a lot of changes.