[Top][All Lists]

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

Re: [Help-gsl] Random generator: linking problem

From: Joseph Wakeling
Subject: Re: [Help-gsl] Random generator: linking problem
Date: Mon, 11 May 2009 20:04:47 +0200
User-agent: Thunderbird (X11/20090409)

Marco Tului wrote:
> I have read the GSL manual, and in my Makefile I wrote:
> :::::::::::::::::::::::
> random_generator.o: random_generator.hpp random_generator.cpp
> g++ -c random_generator.cpp -lgsl -lgslcblas -lm
> ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

This is the source of your problem.  You don't need the -lgsl -lgslcblas
-lm when you are compiling the source into object files -- you need it
at the linking stage.

So remove the -lgsl etc from the section above and add them to the part
where you compile all the .o files into the executable.  Then it should
work. :-)

reply via email to

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