A problem with GNU Scientific Library GSL

M

manuhack

#include <iostream>
#include <gsl/gsl_math.h>
int main(){
double x;
x=gsl_pow_2(4);
std::cout << x << std::endl;
}

I ran an example using GSL. I added the path after -I when I compiled
it. I kept getting error. The error message was: undefined reference
to 'gsl_pow_2.

Any clue?
 
V

Victor Bazarov

manuhack said:
#include <iostream>
#include <gsl/gsl_math.h>
int main(){
double x;
x=gsl_pow_2(4);
std::cout << x << std::endl;
}

I ran an example using GSL. I added the path after -I when I compiled
it. I kept getting error. The error message was: undefined reference
to 'gsl_pow_2.

Any clue?

How about reading (and quoting) the documentation about 'gsl_pow_2'
function? It's not a standard C++ function, so nobody here necessarily
has any knowledge of it. The only prerequisite knowledge here is about
the language and the standard library.

Also, if GLS is a GNU project, don't they have some kind of online (web)
forum for any discussions on those? There is also a whole 'gnu.*' family
of newsgroups, you know.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top