rounding numbers in gcc ?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Bill Jonas
Date:  
Subject: rounding numbers in gcc ?
--esjekvHZsBhZxdnx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Oct 31, 2002 at 08:58:28AM -0700, Liberty Young wrote:
> gcc -Wall -D_GNU_SOURCE -D_ISOC99_SOURCE foo.c -o foo


Add "-lm" somewhere on that line so that you link against the math
library. Yes, you included math.h, but the linker won't know to link it
against the math library unless you tell it to do so.

--=20
Bill Jonas    *        *    http://www.billjonas.com/
"They that can give up  essential  liberty to obtain a little temporary
safety deserve neither liberty nor safety."        -- Benjamin Franklin


--esjekvHZsBhZxdnx
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD4DBQE9wVtYdmHcUxFvDL0RAmVxAJdpyx5H4EWDkfC6xvcx5CcWqw9zAKChqCpE
WiYrpyOxrypfUv2tt8Dqhg==
=q94x
-----END PGP SIGNATURE-----

--esjekvHZsBhZxdnx--