This is the mail archive of the
gsl-discuss@sourceware.cygnus.com
mailing list for the GSL project.
Re: Linking problem
- To: Marcin Chady <M dot Chady at cs dot bham dot ac dot uk>
- Subject: Re: Linking problem
- From: Dirk Eddelbuettel <edd at debian dot org>
- Date: Sat, 8 Apr 2000 15:43:59 -0400
- Cc: Dirk Eddelbuettel <edd at debian dot org>, gsl-discuss at sourceware dot cygnus dot com
- References: <001701bfa163$40f07d40$934d08c3@d0p8g5>
Marcin,
You didn't say which version of Debian's gsl package you are using. I'd
suggest that you upgrade to the 0.5+ package I just prepared last week -- it
has everything (but blas) in one library which should make linking easier.
It also represents newer GSL code. You should find it on the Debian mirrors,
or using Debain website using the Packages page. As new code, it sits in
'unstable', but it doesn't require any other new libraries so you can run it
on 'frozen' (where I built it).
Else, we can try to hunt this down. However, I am away from home riht now
and don't have good access to my box.
Thanks, Dirk
On Sat, Apr 08, 2000 at 01:56:16PM +0100, Marcin Chady wrote:
> Hi,
>
> Sorry if this is a silly question, but I really can't work out what I'm
> doing wrong. I'm trying to use the random number suite from GSL, but I have
> problems linking against libgslrng and libgslrandist. It's a C++ program,
> compiled with g++ 2.95.2, on a Debian Linux PC, running kernel 2.2.1, libc6
> 2.1.3. The compilation goes fine, but at the linking stage:
>
> g++ -I/usr/include/gsl -MMD -O Config.o Exception.o Random.o Distribution.o
> distributions.o -L/usr/lib/gsl -lgslsys -lgslerr -lgslspecfunc -lgslrng -lgs
> lrandist -o distributions
>
> I get errors like this:
>
> Random.o: In function `__static_initialization_and_destruction_0':
> Random.o(.text+0x28): undefined reference to `gsl_rng_env_setup(void)'
> (...more of the kind...)
> Random.o: In function `Uniform::next(void)':
> Random.o(.Uniform::gnu.linkonce.t.next(void)+0x10): undefined reference to
> `gsl_rng_uniform(gsl_rng const *)'
> (...more of the kind...)
> distributions.o: In function `main':
> distributions.o(.text+0x1ca6): undefined reference to
> `gsl_rng_env_setup(void)'
> (...more of the kind...)
> collect2: ld returned 1 exit status
> make: *** [distributions] Error 1
>
> Can you help please?
>
> Marcin
>
--
According to the latest figures, 43% of all statistics are totally worthless.