Mail Archives: djgpp/1993/12/10/05:13:28
>On Thu, 9 Dec 1993 turnblom AT nature DOT Berkeley DOT EDU wrote:
>
>> Greetings!
>>
>> I have just been tinkering with release 1.10 and the f2c compiler
>> which comes in tpf2c100.zip located with other djgpp archives. To
>> test things out I have a simple 3 subroutine FORTRAN program that
>> works fine compiled with MS-FORTRAN v5.1. When I `f2c' it, then `gcc'
>> it I get a bunch of "undefined references" for the following:
>>
>> ... undefined reference to `s_copy'
>> `s_wfse'
>> `e_wfse'
>> `s_rsfe'
>> `do_fio'
>> `e_rsfe'
>> `s_cmp'
>> `s_cat'
>> `s_stop'
>>
>> Can someone please clue me in to whether this is an f2c anomaly, or
>> have I forgotten to include a particular library (`-l' option)?
>>
>> Any help appreciated.
>> ----------------------------------------------------------------------
>> Eric C. Turnblom Department of Environmental Sciences,
>> turnblom AT smokey DOT berkeley DOT edu Policy and Management - Forestry
>> TEL:(510) 642-7164 145 Mulford Hall - Univ. of Calif.
>> FAX:(510) 643-5438 Berkeley, CA 94720
>> "Mecca lecca hi, mecca hidey ho." -Jambi
>> ----------------------------------------------------------------------
>>
>You must link with the following libraries ( in this order ):
>
> -lF77 -lI77 -lm -lc
>
>Check out one the ".c" files produced by f2c a note on linking with the
>correct libraries is usually included.
>
>I hope this helps.
>
>H. I. SALEH
>
Yes, you're right, it's in the order of -LF77 -lI77 and not the other way
around as I mistakenly mentioned in my comment to the original author's
posting.
The recent f2c only mentions
-lf2c -lm -lc
in the produced .c file. This is because one can comprise libI77.a and libF77.a
into one big libf2c.a
--Chris
----------------------------------------------------------------------------
Christoph P. U. Kukulies | BIX: chriskuku AT bix DOT com
kuku AT acds DOT physik DOT rwth-aachen DOT de | CIS: 73007,1525
*** Error code 1
Stop.
- Raw text -