This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Help with strange compiler error linking to GSL
- From: "Lee Rhodes" <lee at rhoba dot com>
- To: <cygwin at cygwin dot com>
- Date: Thu, 5 Jul 2007 10:55:57 -0700
- Subject: Help with strange compiler error linking to GSL
Hello,
I have installed the GSL libs via setup and am trying to get the following
example program to work:
#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;
}
The compiler/linker is able to locate the header ok, but the error message I
get on the line that calls the function is:
undefined reference to `_gsl_sf_bessel_J0'
Somehow the function name got mangled with an added underscore, and of
course, it doesn't exist.
Any help would be appreciated.
Thanks,
Lee.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/