Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!agate!shelby!lindy!news From: LC.YRS@forsythe.stanford.edu (Richard Stanton) Newsgroups: comp.lang.c Subject: Re: USING FORTRAN/IMSL LIB. FROM C Message-ID: <8091@lindy.Stanford.EDU> Date: 16 Feb 90 19:08:32 GMT Sender: news@lindy.Stanford.EDU (News Service) Distribution: usa Lines: 22 In article <1990Feb16.172952.24266@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes: >In article majmudar@amalthea.rutgers.edu (Keyur Majmudar) writes: >>I am trying to call an IMSL subroutine (qdags) [in FORTRAN] from a C >>program, but I have not been succesful in doing so. >>I keep on getting an error "Unresolved symbols .... - symbol : _qdags" > >You need to look in your Fortran manual to find out the details of linking >Fortran to C on your particular system. (It is almost impossible to give >specific advice without knowing your machine or operating system.) Often I agree with this advice. I have never actually got around to using IMSL or NAG from C, but it is something I may do in the near future. In case you are using VAX C / FORTRAN, the manuals talk in a fair amount of detail about how to do the calling process from C to FORTRAN and vice versa. The other thing to be aware of is that when you are linking your code, you will need to specify the IMSL library either in the command line, or as one of LNK$LIBRARY, LNK$LIBRARY_n where n = 1 or 2 (n can be up to 4 for FORTRAN, but C only uses up to 2). Hope this may help someone. Richard Stanton