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]

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


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