Date: Fri, 10 Dec 93 09:51:50 +0100 From: kuku AT acds DOT physik DOT rwth-aachen DOT de (Christoph Kukulies) To: djgpp AT sun DOT soe DOT clarkson DOT edu, turnblom AT nature DOT berkeley DOT edu Subject: Re: djgpp and f2c > >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. What you need is to specify the f2c runtime library in your command line. This is normally gcc -o outfile file1.o ... filen.o -L/your/f2c/lib/path -lI77 -lF77 -lm -lc (the latter, -lc can be omitted, -lm is necessary in most cases since there are only few fortran program that do not use math functions) I think 1.11 should work with the old libs and binaries. >---------------------------------------------------------------------- >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 >---------------------------------------------------------------------- --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.