[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] undefined reference problem with GSL functions
From: |
Mike Smith |
Subject: |
Re: [Help-gsl] undefined reference problem with GSL functions |
Date: |
Tue, 26 Jul 2005 15:40:12 -0700 (PDT) |
I found it's fine if I do the following (as suggested
by the manual)
gcc -Wall -I/usr/local/include/gsl -c test.c;
gcc -L/usr/local/lib/ test.o -lgsl -lgslcblas -lm
Or equivalently do the following
gcc -L/usr/local/lib/ test.c -lgsl -lgslcblas -lm
Thanks for your attention.
--Mike
--- Mike Smith <address@hidden> wrote:
> Hello, All
>
> I tried a very simple example on the gsl reference
> manual to test the GSL installed in my Cygwin. The
> program is the following:
>
> #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;
> }
>
> When I do
>
> gcc -Wall -L/usr/local/include/gsl test.c -o test ,
>
> the following error will be reported:
> ..../Temp/ccRVEv5H.o:test.c:(.text+0x3a): undefined
> reference to `_gsl_sf_bessel_J0'
>
> The undefined reference problem is persistent
> whenever
> I try to use any GSL functions.
>
> I installed gsl in the default directory and "make
> check" works fine.
>
> Does anybody know what happens?
>
> Thanks a lot,
>
> --Mike
>
>
>
> ____________________________________________________
> Start your day with Yahoo! - make it your home page
> http://www.yahoo.com/r/hs
>
>
>
> _______________________________________________
> Help-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl
>
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs