help-gsl
[Top][All Lists]
Advanced

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

[Help-gsl] Compile C++ with GSL


From: Thomas Bisig
Subject: [Help-gsl] Compile C++ with GSL
Date: Fri, 18 Mar 2005 18:03:14 +0100
User-agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)

Hi list

I'd like to include the GSL into a single C++ file test.cpp and compile it. What do I have to do?

I have a file with the single allocation of a matrix m like

gsl_matrix * m = gsl_matrix_alloc (4, 4);

I compile with (-lgslcblas is dispensable)

gcc test.cpp -lgsl -lm -lgslcblas

but I get an error

ld: Undefined symbols:
___gxx_personality_v0

The documentation says that one should be able to simply include the libraries into a C++ file and it should work. Where's the mistake?

Thanks again

thomas

Ps: A not so GSL related question: I don't understand why I have to add -lgsl and so on when I want to compile. I include the libraries in the file so the compiler should know what to link!? Or do I have to say the gcc explicitly that I want to link to GSL and cBLAS?

(Don't think I don't read the mail archives; I'm a little bit a newbie)




reply via email to

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