This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
undefined reference
- From: cx101 <cx101 at ohm dot york dot ac dot uk>
- To: gsl-discuss at sources dot redhat dot com
- Date: Mon, 22 Sep 2003 19:12:34 +0100
- Subject: undefined reference
Hi guys,
I never compiled a programme successfully after I installed GSL 1.4. I
was always told undefined reference to some head files. I even got the
warning message after run the following simple programme from the manual
of GSL:
#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;
}
When compiling, I was told:
/tmp/cc807SzQ.o(.text+0x28): In function 'main':
:undefined reference to 'gsl_sf_bessel_J0'
collect2: ld return 1 exit status
My gcc is 3.2.3, system is Mandrake 9.1.
I know it is a very stupid question. I am a rookie for linux.
Cheng