Sir

In annex a small program to demonstrate the error.

Compile : gcc -std=gnu99 -Wall  : No error.
Link : gcc -std=gnu99 No error.

Execute : error message :
symbol lookup error: ./testrng: undefined symbol: gsl_cdf_poisson_P
or :
symbol lookup error: ./testrng: undefined symbol: gsl_cdf_poisson_Q
depending on which routine I called.

I use GSL version 1.9 recently downloaded and installed in /usr/local.
The two routines in question are present in the relevant include file.

What am I doing wrong ?

Thank you for your attention

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

#define MEAN 3.0

int main()
{
double mean = MEAN, sigma = 1.0, maxval = 5.0 ;
double v1, v2, v3 ;
gsl_rng *ran ;

ran = gsl_rng_alloc(gsl_rng_cmrg) ;
if(!ran)
    {
    printf("gsl_rng_alloc() failed\n") ;
    exit(0) ;
    }

v1 = gsl_cdf_gaussian_P(-mean,sigma) ;
v2 = gsl_cdf_gaussian_Q(maxval - mean,sigma) ;
v3 = gsl_cdf_poisson_P(5,mean) ;
/*
v3 = gsl_cdf_poisson_Q(5,mean) ;
*/

printf("v1=%f  v2=%f  v3=%f\n",v1,v2,v3) ;

exit(0) ;
}
_______________________________________________
Bug-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gsl

Reply via email to