M
Marcelo
Hello,
I am having somre problems with the GSL library from GNU. I am trying to do a
HelloWorld example but it doesn't link well.
#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;
}
and the command is
g++ -I/usr/local/include/gsl test.cpp -o test
but it doesn't work at all on Linux.
My GSL headers are in /usr/local/include/gsl and the error is
/tmp/cc4wOtbY.o: In function `main':
test.cpp.text+0x36): undefined reference to `gsl_sf_bessel_J0'
collect2: ld returned 1 exit status
Thanks a lot for your help.
Marcelo
I am having somre problems with the GSL library from GNU. I am trying to do a
HelloWorld example but it doesn't link well.
#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;
}
and the command is
g++ -I/usr/local/include/gsl test.cpp -o test
but it doesn't work at all on Linux.
My GSL headers are in /usr/local/include/gsl and the error is
/tmp/cc4wOtbY.o: In function `main':
test.cpp.text+0x36): undefined reference to `gsl_sf_bessel_J0'
collect2: ld returned 1 exit status
Thanks a lot for your help.
Marcelo