[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] Newbie linker error
From: |
Brendan O'Fallon |
Subject: |
[Help-gsl] Newbie linker error |
Date: |
Tue, 30 Mar 2004 09:09:44 -0700 |
Hi, I recently installed gsl-1.4 on my linux machine (Redhat 9, kernel
2.6.3, gcc 3.2.2), and configured and installed it the usual way
(./configure... make... make install...) in the default directory.
Everything seemed to go fine, and 'make check' didn't reveal any
obvious errors. However, when attempting to compile and link a very
simple program the linker returns some errors. Specifically, given a
short bit of code taken right from the gsl reference manual, I get the
following error:
[1005 ~/Projects]$gcc mathc.c
/tmp/ccUNn21s.o(.text+0x28): In function `main':
: undefined reference to `gsl_sf_bessel_J0'
collect2: ld returned 1 exit status
where the code is:
#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;
}
This same error occurs whenever I try to use any part of the library, in
any example program given in the Reference. Surely, there is something
very basic that I am missing here. A compiler option? Any help would be
sincerely appreciated. Thanks in advance.
Brendan
--
Brendan O'Fallon
address@hidden
--
http://www.fastmail.fm - Or how I learned to stop worrying and
love email again
- [Help-gsl] Newbie linker error,
Brendan O'Fallon <=