Path: utzoo!utgpu!watserv1!watmath!att!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!jarthur!uunet!uhura1!uhura1!bill Newsgroups: comp.lang.fortran Subject: Re: Help me with make-ing f2c on a Sparcstation Message-ID: <1990Nov2.152851.3554@uhura1.uucp> Date: 2 Nov 90 15:28:51 GMT References: <27757@usc> Sender: bill@uhura1.uucp (Bill Wade) Organization: Drem Incorporated, Houston Lines: 26 In article <27757@usc> ajayshah@almaak.usc.edu (Ajay Shah) writes: > >I tried a lot of things without success. Each attempt generated >a different set of errors, what is shown below is the "best" >I could do. > >Does someone know a recipe for make-ing a working f2c system on a Sun? > > (... good sample program omitted ...) > >[max 11] cc main.c junk.o -lF77 -lI77 -lm -lc >ld: Undefined symbol > _MAIN_ You probably managed to use the libF77.a from sun fortran 1.3. This is normally located in /usr/lang/SC0.0, and got included because your environment variable LD_LIBRARY_PATH said to. The sun library expects the fortran main to be called '_MAIN_'. The f2c version of libF77.a expects the fortran main to be called '_MAIN__'. To be sure of getting the right libraries, give them a distinctive name, like libFf2c.a and libIf2c.a, and link with 'cc ... -L -lFf2c -lIf2c ...' Hope this helps.