Calling GSL functions from Fortran ?

Jacek Pliszka
Mon Apr 29 13:22:00 GMT 2002

On Mon, 29 Apr 2002, Daniel T Konkle wrote:

> Has anyone out there used the GSL library with Fortran?
> I'm looking for an example of calling one of the function from Fortran.

Write a simple C wrapper. Like this:

double my_gsl_ran_gaussian_(double *sigma){

a) on some systems you have to add _ or __ to the name
b) fortran passes everything as reference so you have to go with pointers
c) may depend on compiler

For Linux g77/gcc add _

Good Luck,


More information about the Gsl-discuss mailing list