This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Borland C++ gsl_rng
- From: Michał Strug <mbr4 at o2 dot pl>
- To: gsl-discuss at sources dot redhat dot com
- Date: Mon, 17 May 2004 23:11:21 +0200
- Subject: Borland C++ gsl_rng
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