[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Re: Random number generator: compiling issue on a Mac (1
Re: [Help-gsl] Re: Random number generator: compiling issue on a Mac (10.4.11)
Sat, 11 Apr 2009 23:49:42 +0200
Ok, thanks. I made a try by terminal and it works. Fine. But maybe could you
tell me how to use the GSL also inside my IDE, Eclipse? Do you know that?
On Sat, Apr 11, 2009 at 9:20 PM, Joseph Wakeling <
> Marco Tului wrote:
> > By the way, if I write instead by terminal simply "g++ -c
> > random_generator.cpp" I don't receive errors: it seems to be fine. How's
> > possible?
> The point is that if you use g++ -c then you are compiling the code to
> object form -- not linking it together to form an executable. The -l...
> commands tell the compiler what libraries your program needs to link to
> -- and hence if you are using the -c option they are superfluous. So,
> the compiler, being nice and helpful, tells you that.
> You only need to use -lgsl -lgslcblas -lm when you are calling g++ to
> link together your object files into an executable.