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]

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


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