help-gsl
[Top][All Lists]
Advanced

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

[Help-gsl] help with the rng function


From: Jia Zou
Subject: [Help-gsl] help with the rng function
Date: Mon, 20 Nov 2006 00:53:45 -0800

Hi there,
I've installed the gsl and I've been trying to make it compile with some C
sode. In the code, I currently have:
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>

I've installed the gsl according to instruction.

I've tried to compile the code with:
g++ -lgsl -LLIBDIRc:/Programs/cygwin/usr/local/lib
-Ic:/Programs/cygwin/usr/local/include c:/Downloads/simulate3node.cpp

where c:/Programs/cygwin/usr/local/lib is where the libgsl.a file resides,
and c:/Programs/cygwin/usr/local/include/gsl is where the gsl_randist.h and
gsl_rng.h resides.

However I've been getting the following errors:

$ g++ -lgsl -LLIBDIRc:/Programs/cygwin/usr/local/lib
-Ic:/Programs/cygwin/usr/l
ocal/include c:/Downloads/simulate3node.cpp
/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccygwz7D.o:simulate3node.cpp:
(.text+
0x17c): undefined reference to `_gsl_rng_env_setup'
/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccygwz7D.o:simulate3node.cpp:
(.text+
0x181): undefined reference to `_gsl_rng_default'
/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccygwz7D.o:simulate3node.cpp:
(.text+
0x195): undefined reference to `_gsl_rng_alloc'
/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccygwz7D.o:simulate3node.cpp:
(.text+
0x1c6): undefined reference to `_gsl_ran_discrete_preproc'
/cygdrive/c/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccygwz7D.o:simulate3node.cpp:
(.text+
0x33e): undefined reference to `_gsl_ran_discrete'
collect2: ld returned 1 exit status


Could you help me figure out why this is please?

Thanks,

Sincerely,

Jia


reply via email to

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