Problem with compiling program

V Karthik karthik1024@yahoo.com
Sat May 17 12:46:00 GMT 2003


I recently installed GSL with the default options by
first executing './configure' and then 'make' and then
'make install'. But when I try to compile and run this
example example program given in the manual i get the
following error message. 

The C program is 

#include <stdio.h>
#include <gsl/gsl_sf_bessel.h>

int main(void) {
  double x = 5.0;
  double y = gsl_sf_bessel_J0(x);
  printf("J0(%g) = %.18e\n",x,y);
  return 0;
}

Error Message:

# gcc trial.c
/tmp/ccu8pcOy.o: In function `main':
/tmp/ccu8pcOy.o(.text+0x28): undefined reference to
`gsl_sf_bessel_J0'
collect2: ld returned 1 exit status

I've tried to provide full path for heared files and
libraries while compiling and linking but to no avail.
Could someone please help me.

Thanks
Karthik

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com



More information about the Gsl-discuss mailing list