Help with strange compiler error linking to GSL

Brian Dessent
Thu Jul 5 18:29:00 GMT 2007

Lee Rhodes wrote:

> 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.

You neglected to show us the actual compile and link command you ran
was, and there's really no way we can help you without that.  It's
probably incorrect ordering of arguments.

Also, it is standard that cdecl functions have a leading underscore as
part of their assembler name (which is what the diagnostic messages tell
you, since they're from the linker not the compiler), and this has been
the case for probably the last 20 years of C.


Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list