USING FORTRAN/IMSL LIB. FROM C

Richard Stanton LC.YRS at forsythe.stanford.edu
Sat Feb 17 06:08:32 AEST 1990


In article <1990Feb16.172952.24266 at utzoo.uucp>,
henry at utzoo.uucp (Henry Spencer) writes:
>In article <Feb.15.22.58.45.1990.11984 at amalthea.rutgers.edu> majmudar at 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



More information about the Comp.lang.c mailing list