delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/07/05/13:57:03

X-Spam-Check-By: sourceware.org
From: "Lee Rhodes" <lee AT rhoba DOT com>
To: <cygwin AT cygwin DOT com>
Subject: Help with strange compiler error linking to GSL
Date: Thu, 5 Jul 2007 10:55:57 -0700
Message-ID: <002701c7bf2d$beddf800$0701a8c0@lee8075b>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 11
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

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/

- Raw text -


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