help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] how do you use gsl with fortran?


From: Nino Pereira
Subject: [Help-gsl] how do you use gsl with fortran?
Date: Fri, 20 Aug 2004 18:35:20 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1

Hi,

most of my programming has been in fortran, never C. On linux (debian) I use
f77, which, as I understand, converts into C and then compiles C with gcc.

So, I think I should be able to use gsl with fortran too, but I don't know how.
I tried to modify the C example into fortran, like so:

     program temp
c
c check linux function library
     x= 5.0
     y = gsl_sf_bessel_J0 (x)
     write (6,*) x,y
     stop
     end

but (as I feared) this does not compile (error message:
/tmp/ccSKHysk.o: In function `MAIN__':
/tmp/ccSKHysk.o(.text+0x17): undefined reference to `gsl_sf_bessel_j0_')

There should be a way to let fortran know about gsl, but what's the magic incantation?

Thanks,

Nino













reply via email to

[Prev in Thread] Current Thread [Next in Thread]