This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Compiling after f2c
- From: Omar Gutiérrez Arenas <tardebut at yahoo dot es>
- To: tprince at computer dot org
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 6 Sep 2007 12:05:15 +0200 (CEST)
- Subject: Re: Compiling after f2c
Thanks Tim. It is true that I'm on my own, and I'm
also kind of lost. All this is new for me.
> You may have to define your issue better. You want
> to use f2c translated source without using the f2c
> main.o or the f2c link script, normally named fc?
I just followed the instructions in the f2c manual to
convert Fortran 77 code into C and then compile it. It
seems this is not enough or even right. For example,
there is no main_ line in any of .c files after
translation. I just don't know what are the f2c
main.o or the f2c link script.
> I never heard of anyone using the old f2c on x86-64.
I found the f2c RPM for Fedora 7 in x86-64 machines at
http://rpm.pbone.net/index.php3/stat/4/idpl/4706905/com/f2c-20031026-3.fc7_90.x86_64.rpm.html
> If you don't want to translate fully to C, nor use
> all the libraries of f2c, why not use gfortran?
I need the code in C to make some .mex files in
Octave. At this point I'm compiling to check if
executables are properly generated.
I look forward.
Thanks again
>
> -----Original Message-----
> From: Omar Gutiérrez Arenas <tardebut@yahoo.es>
> To: gcc-help@gcc.gnu.org
> Date: Wed, 5 Sep 2007 19:37:25 +0200 (CEST)
> Subject: Compiling after f2c
>
> Hello there!
>
> I'm running Fedora 7 on an IBM Station M Pro 9229.
> I want to compile a utility from NetLib (Dierckx)
> after translating it from source Fortran 77 to C
> using
> f2c. The original code is composed by the high-level
> routine concon.f that has dependency on 7
> subrutines.
> For translating the 8 .f files into .c files I used,
>
> [root@interaction2 Dierckx]# f2c -A *.f
>
> and the respective .c files were produced. However,
> when I tried to compile them with
>
> [root@interaction2 Dierckx]# cc -o dierckx *.c -lf2c
> -lm
>
> I got the error:
>
> Code:
>
>
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libf2c.so:
> undefined reference to `MAIN__' collect2: ld
> returned
> 1 exit status
>
>
> _______________________
> You may have to define your issue better. You want
> to use f2c translated source without using the f2c
> main.o or the f2c link script, normally named fc?
> You're probably pretty much on your own; I never
> heard of anyone using the old f2c on x86-64.
> If you don't want to translate fully to C, nor use
> all the libraries of f2c, why not use gfortran?
>
> Tim Prince
>
____________________________________________________________________________________
Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras personas te ayuden!
http://advision.webevents.yahoo.com/reto/entretenimiento.html