-
Problem with pow()
Hello all,
I get this error message when I compile my program:
ld:
unresolved:
pow
I had checked all my variables and hard coded values into the pow() function to see if it is working. I also created a test program to test the pow() function but no luck.
Any ideas on the causes of this message??
Thanks in advance!
-
i assume from the error message youve included math.h so you need link to this library LIBC.LIB
-
thanks for the reply.
Could you show the syntax for it?? Would it be placed with the preprocessor directives?
My textbook does not show a 'libc.lib'. Just a #include <math.h>
-
Try
gcc prog.c -lm
to specify that you want to link in the math library
-
That did it!! Thanks for all the help.