help-gsl
[Top][All Lists]
Advanced

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

[Help-gsl] gsl installation question


From: Jiajun Gu
Subject: [Help-gsl] gsl installation question
Date: Tue, 7 Dec 2004 12:42:51 -0500

I just installed GSL library in a linux system. 
I used 

configure --prefix  mylocalpath
make 
make install


then we i tried to run a simple C program(temp.c), I used compile and
link command

gcc -Wall -I mylocalpath/include/ -c temp.c 
gcc  -L mylocalpath/llib temp.o -lgsl -lgslcblas -lm -o

it generate one a.out file. but when i want to execute the a.out file,
i got the error message:

./a.out: error while loading shared libraries: libgsl.so.0: cannot
open shared object file: No such file or directory

I guess it is an error due to my installation. Can anybody help me
with this? Thank you very much.

-jiajun


***************************************
this is the c program I tested
**************************************

 
#include <stdio.h>
#include <stdlib.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>

gsl_rng * r;

int main(){
const gsl_rng_type *T;
double x, a, b;
int i;
a=3; b=5;
gsl_rng_env_setup();
T=gsl_rng_default;
r=gsl_rng_alloc(T);

for (i=0;i<10;i++){
x=gsl_ran_gamma(r,a,b);
printf(" %f",x);
}
printf("\n");
return 0;
}




reply via email to

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