This is the mail archive of the cygwin mailing list for the Cygwin 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]

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/


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