Re: gcc math functions
Christopher Judd <firstname.lastname@example.org> writes:
> I have a PC with debian 1.3.1 installed (my first linux
> installation). When I try to use the math functions (exp, pow, etc.) in
> gcc I get a message like:
> /tmp/cca016941.o(.text+0x5f): undefined reference to `exp'
> On other systems I have used the "include <math.h>" was sufficient. Is
> there an additional step necessary or is my installation incomplete in
> some way ?
Add -lm to the link step. This links in the math libraries.
Ben Pfaff <email@example.com> <firstname.lastname@example.org> <email@example.com>
Senders of unsolicited commercial e-mail will receive free 32MB core files!
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to firstname.lastname@example.org .