Apparently we're not using the technology forum anymore, so here goes.
I'm having problems compiling programs with gcc and math.h. Some of the functions from math.h work while others are unrecognized by the compiler. For example:
However, if I change "exp(2)" to "pow(2,2)" everything works just fine.
Any ideas?
I'm having problems compiling programs with gcc and math.h. Some of the functions from math.h work while others are unrecognized by the compiler. For example:
Code:
Throws the error
#include <stdio.h> #include <math.h> int main () { printf("%fd\n", exp(2)); return 0; }
Code:
at compile time./tmp/ccuY4Z73.o: In function `main':test.c:(.text+0x26): undefined reference to `exp'
However, if I change "exp(2)" to "pow(2,2)" everything works just fine.
Any ideas?
Ban Jin!
Nobody really needs work when you have awesome. - xhuxus
Nobody really needs work when you have awesome. - xhuxus