X-Spam-Check-By: sourceware.org Message-ID: <468D387A.AA6D243A@dessent.net> Date: Thu, 05 Jul 2007 11:29:14 -0700 From: Brian Dessent 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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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/