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]

Problem with compiling program


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]