Borland C++ gsl_rng
Michał Strug
mbr4@o2.pl
Mon May 17 21:09:00 GMT 2004
Hello
I'm trying to use GSL in Borland C++ Compiler 5.5 (w2k). I've got
every libs. I tried to compile simple program which use gsl/gsl_rng.h.
And during compilation I've got message (other function such as
gsl_rng_env_setup were consolidated without problems):
Error: Unresolved external '_gsl_rng_default' referenced from
C:\PROGRAMY\BCC55\PROGS\GSL\PROG.OBJ
compiling commands:
bcc32 -ps -c prog.cpp
ilink32 -ap prog.obj c0x32,,,cw32 import32 libgsl libgslcblas
libgsl.lib libgslcblas.lib I've maked from libgsl.dll and
libgslcblas.dll using implib.exe
program code:
#include <stdio.h>
#include <iostream.h>
#include <gsl/gsl_rng.h>
int main (void) {
const gsl_rng_type * T;
gsl_rng * r;
int i, n = 10;
gsl_rng_env_setup();
T = gsl_rng_default;
r = gsl_rng_alloc (T);
for (i = 0; i < n; i++) {
double u = gsl_rng_uniform (r);
printf ("%.5f\n", u); }
gsl_rng_free (r);
return 0; }
Michal
More information about the Gsl-discuss
mailing list