This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem in linking the lib


To make things even simpler, you don't have to specify your library path, 
since compiler will look in /usr/lib anyway. In your case it is enough to 
write
gcc tst.c -lgsl
or depending on what do you want to compile you might have to use
gcc tst.c -lgsl -lgslcblas -lm

Slaven

On Tuesday 14 May 2002 06:17 am, Achim Gaedke wrote:
> Hmm... Maybe it is a typo: the gcc command must be:
>
> gcc -L/usr/lib -lgsl test.c
>
> Please note the space between the option -L/usr/lib (extends the library
> searchpath) and the option -lgsl (command to link against gsl library).
>
> Achim
>
> Chang Chew Wai schrieb:
> > Dear sir, i think i need some help with gsl. i installed the rpm for
> > gsl-1.1.1-0. and was unable to link it to the lib.
> >
> > i tried to compile with the following command.
> > gcc -L/usr/lib-lgsl test.c
> >
> > the error messages are
> > /tmp/ccrOm9yz.o: In function `main':
> > /tmp/ccrOm9yz.o(.text+0x24): undefined reference to `gsl_stats_mean'
> > /tmp/ccrOm9yz.o(.text+0x3f): undefined reference to `gsl_stats_variance'
> > /tmp/ccrOm9yz.o(.text+0x5a): undefined reference to `gsl_stats_max'
> > /tmp/ccrOm9yz.o(.text+0x75): undefined reference to `gsl_stats_min'
> >
> > thanx
> > waiting for the reply
> > chew wai


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]