help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: oct-file with GSL


From: Quentin Spencer
Subject: Re: oct-file with GSL
Date: Tue, 23 May 2006 09:26:43 -0400
User-agent: Thunderbird 1.5.0.2 (X11/20060501)

Michael Kopp wrote:
Kevin H. Hobbs wrote:
On Mon, 2006-05-22 at 15:57 +0200, Michael Kopp wrote:
Hello,

I am trying to write an oct-file that uses the random-number generator from
 the GNU Scientific Library (see e.g.
http://www.lsw.uni-heidelberg.de/manuals/gsl-ref-html/gsl-ref_16.html.)
<SNIP>

I get an error message stating

        error: /home/michael/gsl_rand.oct:
        undefined symbol: gsl_rng_mt19937
        error: `gsl_rand' undefined near line 2 column 1

Note that gsl_rng_mt19937 is defined in gsl_rng.h and that the C-compiler
does not complain.
Did you tell it to link against gsl and a cblas? gsl_rng_mt19937 isn't
defined until link?

Probably not. I do not know much about linking etc., but now I tried

mkoctfile -l/usr/lib/libgsl.so -l/usr/lib/libgslcblas.so gsl_rand.cc

However, I get the error message

/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/bin/ld:
cannot find -l/usr/lib/libgsl.so
collect2: ld returned 1 exit status

(although the two files exist in /usr/lib).

Any suggestions? Sorry to bother you again,


I think what you want is "-lgsl". The linker figures out the rest automatically.

-Quentin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]