delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/07/05/14:29:42

X-Spam-Check-By: sourceware.org
Message-ID: <468D387A.AA6D243A@dessent.net>
Date: Thu, 05 Jul 2007 11:29:14 -0700
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Help with strange compiler error linking to GSL
References: <002701c7bf2d$beddf800$0701a8c0 AT lee8075b>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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.

Brian

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019