Dear gsl users,

I wish to use gsl in my Fortran 90 program.
So far, I've written 2 C routines as the follwing:

*#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
#include "gslwr.h"

static gsl_rng* r;

void rng_initialise__(int* s)
{
r = gsl_rng_alloc(gsl_rng_taus);
gsl_rng_set(r, (unsigned long int)(*s));

void rng__(double* zetha)
{
*zetha = (double)gsl_rng_uniform_pos(r) ;
}*

And my program in Fortran 90 looks like that:

*PROGRAM random
IMPLICIT NONE
integer :: seed = 0
double precision :: zetha

call system_clock(seed)
call rng_initialise(seed)
call rng(zetha)
PRINT*, "zetha=",zetha

END PROGRAM random
*

I'm able to creat *.o file doing *icc -c gslwr.c* and *ifc -c gsl.f90*.
But when I do *ifc gsl.o gslw.o* I get

/*gsl.o: In function `MAIN__':
gsl.f90:(.text+0x2c): undefined reference to `rng_initialise_'
gsl.f90:(.text+0x36): undefined reference to `rng_'*/

Does someone understand what's wrong with this?
On the other hand I've heard about fgsl
<http://www.lrz-muenchen.de/services/software/mathematik/gsl/fortran/index.html>.
Dose someone use it?
What do you think about it?

I thank you in advance,
Best,

Eric.
--
/Be the change you wish to see in the world
/ — GANDHI —

Dr. Éric Germaneau <mailto:[EMAIL PROTECTED]>
Chemical Engineering Department
University of Massachusetts Amherst
159 Gœssmann Laboratory
686 North Pleasant Street
Amherst, MA 01003-9303
USA
Tel: 413-545-6209 (Office)

/msn/: [EMAIL PROTECTED]
/skype/: aihaike

/ Please consider the environment before printing this email.
Considérez svp l'environnement avant d'imprimer cet email. /




_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to