Date: Mon, 8 Nov 2004 14:20:47 -0500 From: Vince Sabio <vince@vjs.org> To: seebs@plethora.net (Peter Seebach) Cc: freebsd-questions@freebsd.org Subject: Re: math.h doesn't include pow? Message-ID: <p05200f16bdb5764065c9@[192.168.0.5]> In-Reply-To: <200411081904.iA8J41Ff009205@herd.plethora.net> References: <200411081904.iA8J41Ff009205@herd.plethora.net>
next in thread | previous in thread | raw e-mail | index | archive | help
** Sometime around 13:03 -0600 11/08/2004, Peter Seebach sent everyone: >In message <p05200f14bdb56efeb236@[192.168.0.5]>, Vince Sabio writes: > >>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? > >FAQ. > >Very FAQ. I thought it must have been, so I searched my list archives -- which, admittedly, go back only to January of this year -- but didn't find anything on this problem. If there's a formal FreeBSD FAQ, I'd be happy to be clue-batted with it FFR. >Headers and libraries are distinct. Headers provide prototypes; libraries >provide definitions. Yes, my bad; sorry about that: % sed 's/libraries/headers/' >You want "-lm". Ah! Yes, that did the trick. Muchas gracias, or however those wacky Irish spell it.... -- __________________________________________________________________________ Vince Sabio vince@vjs.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05200f16bdb5764065c9>