This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Mon, Apr 29, 2002 at 12:07:55PM -0700, Jacek Pliszka wrote: > 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){ > return(gsl_ran_gaussian(gsl_rng_mt19937,*sigma)) > } > > > Remember: > 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, > > Jacek Hi, I have attached a file, I had written sometime ago. Some of it is out of date, but it might still be useful. Use at your own risk... atakan gurkan
Attachment:
fortran-C.ps
Description: PostScript document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |