math.h doesn't include pow?
vince at vjs.org
Mon Nov 8 11:00:54 PST 2004
My C library documentation states that the "pow" (power) function is
included in math.h. However, when I go to link (compiling and linking
with gcc), I get the following:
In function `[function name]':
[path/]datetime.c:668: undefined reference to `pow'
Yes, I'm including <math.h>. If I compile the exact same code under
Darwin (BSD on PowerPC), it compiles fine. It also compiles in
CodeWarrior. Is anyone else familiar with this problem? Could I have
a path set up incorrectly, and be using the wrong libraries?
Running FreeBSD v5.1, installed from CD, including the developer
tools. Single-boot system; there is no Microsoft software anywhere on
the machine, so it's not their fault (for a change). ;-)
Vince Sabio vince at vjs.org
More information about the freebsd-questions