Help with strange compiler error linking to GSL

Lee Rhodes lee@rhoba.com
Thu Jul 5 17:56:00 GMT 2007


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/



More information about the Cygwin mailing list