use gcc to link gcc and g77
Joe Durusau
durusau@delphi.com
Fri Oct 1 00:00:00 GMT 1999
This is only a guess, but try using -L<wherever forlib.a is> and -lfor
on gcc. (You will probably need more than just that, but it might be
a start.)
Speaking only for myself,
Joe Durusau
Andy Felt wrote:
> Hi folks-
> I'm not sure where to post this. If you have suggestions, please suggest
> away.
>
> I have a mixed fortran/C program. I compile the .c files with gcc, .f files
> with g77, and link with gcc. The linking is not working on (RedHat
> 5.2) linux, and I think it's because I need to link to a fortran library,
> but I don't know if one exists or what it's called.
>
> The program compiles and links fine on a DEC alpha using the cc and f77 that
> came with the DEC, and cc to link with a -lfor flag.
> ^^^^^^^^^^^^^^^^^
>
> On the linux with gcc and g77, there is no libfor.a lib file that I can
> find. When gcc tries to link, I get thousands of errors like:
>
> /usr1/felt/software/cpa/YLP/ymaps.f:215: undefined reference to `s_stop'
>
> In this case, line 215 of ymaps.f has a STOP command. The linker can't find
> any of the fortran object commands. Does anyone know what library I need to
> link to and where to get it?
>
> Thanks much!
>
> Andy
>
> -------------------------------------------------------------------
> Andy Felt | felt@math.wsu.edu |
> Dept. of Pure and Applied Mathematics| |
> Washington State University | http://www.wsu.edu/~felta/ |
> -------------------------------------------------------------------
> Be the person your dog thinks you are.
More information about the Gcc-help
mailing list