From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1094ba,544eff2e649ee2f0 X-Google-Attributes: gid1094ba,public X-Google-Thread: 1014db,544eff2e649ee2f0 X-Google-Attributes: gid1014db,public X-Google-Thread: f678f,544eff2e649ee2f0 X-Google-Attributes: gidf678f,public From: paolowalter@my-dejanews.com Subject: Re: Calling Fortran 90 subroutine from C program Date: 1999/01/08 Message-ID: <7762s6$vmg$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 430322641 References: <3696113A.EB982027@cranfield.ac.uk> <775b1h$jsc$1@sparcserver.lrz-muenchen.de> X-Http-Proxy: 1.0 x13.dejanews.com:80 (Squid/1.1.22) for client 192.84.142.59 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Fri Jan 08 23:03:35 1999 GMT Newsgroups: comp.unix.osf.misc,comp.lang.c,comp.lang.fortran X-Http-User-Agent: Mozilla/3.0Gold (X11; I; HP-UX B.10.20 9000/871) In article <775b1h$jsc$1@sparcserver.lrz-muenchen.de>, Manfred Weiser wrote: > Hi, > > you should give the option -lfor (or -lf2c for Linux) in order to > link Fortran routines correctly. Good suggestion, but not always literaly true. The point is that if you do not link with the fortran linker (probably f77 or f90 for you) you do not get automatic acceess to the Fortran system library and you need to link them by hand. On my system they are libf.a, hence you need -lf Otherwise you can link with the Fortran linker and link by hand the c routines -lc. Ciao Paolo > > Bye, > Manfred > ------------------------------------------------------------------------------ > Manfred Weiser Physik-Department der TU Muenchen, Institut T30 > Telephon: ++49 (89) 289-14608 (Fax: -12296) > E-Mail: mweiser@physik.tu-muenchen.de > > -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own