Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Feb 1998 08:39:39 -0100
From:      Malte Lance <malte@webmore.com>
To:        Brandon Stewart <rostewa2@vt.edu>
Cc:        questions@FreeBSD.ORG
Subject:   Re: How to get c-math library functions to work
Message-ID:  <3.0.32.19980203083938.02fad704@cyclone.degnet.baynet.de>

next in thread | raw e-mail | index | archive | help
Include "-lm" in the linking-stage of cc

Malte Lance
malte@webmore.com

At 01:27 03.02.98 +0000, you wrote:
>I cannot get the various goodies in math.h to work. I need the exp()
>function for a numerical methods class for an assignment due tomorrow (a
>quick reply would be greatly appreciated). When I compile a file that
>includes math.h and uses exp(), I get a linker error (undefined .. _exp
>referenced from text segment). I tried the same code on the lab machines
>(Which also run freebsd), and got the same thing. Brought the code to a
>win95 machine, and compilation and linkage worked perfectly. Quick help
>would be appreciated.
>
>Cheers,
>Brandon
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.32.19980203083938.02fad704>