[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] help with the rng function
From: |
Jordi Gutierrez Hermoso |
Subject: |
Re: [Help-gsl] help with the rng function |
Date: |
Mon, 20 Nov 2006 18:54:24 -0500 |
On 20/11/06, Jia Zou <address@hidden> wrote:
Hi there,
I've installed the gsl and I've been trying to make it compile with some C
sode.
[snip]
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
You're getting linker errors. If gcc behaves the same on Cygwin as it
does in its natural habitat, you probably ought to compile and link
instead with the command
g++ -lgsl -Lc:/Programs/cygwin/usr/local/lib \
-Ic:/Programs/cygwin/usr/local/include c:/Downloads/simulate3node.cpp
(One line, of course. I put in a backslash as a line break so that it
would fit in this email.)
Notice that I simply changed -LLIBDIR with -L.
I'm not sure if the rng functions use GSL's CBLAS interface, but if
the above compilation command doesn't work, try linking with
-lgslcblas and -lm too. You might also want to read about GNU make and
Makefiles if you're going to be coding anything larger than a few
source files. Bruce Eckel's /Thinking in C++/ book available online
for a free (beer) download does a good job IMHO of giving a very brief
overview of Makefiles in its first volume. I forget which chapter it's
in, and I don't have the book handy, but you can probably find
Makefiles in its index.
HTH,
- Jordi G. H.