Date: Sat, 6 Feb 1999 19:50:35 -0500 (EST) From: "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com> To: keith@apcs.com.au Cc: questions@FreeBSD.ORG Subject: Re: math.h ? Message-ID: <199902070050.TAA27981@cc942873-a.ewndsr1.nj.home.com> In-Reply-To: <XFMail.990207113238.keith@apcs.com.au> from Keith Anderson at "Feb 7, 99 11:32:38 am"
index | next in thread | previous in thread | raw e-mail
Keith Anderson wrote,
> HI All,
>
> Below I have a very simple 'c' program but I can't make it work !! What am I
> doing wrong, it will not compile?
>
> Any help would be great
>
> Thanks
>
> Keith
>
> <snip test.c>
> #include <math.h>
>
> main ()
> {
> double x = 64;
> double ans;
> ans = sqrt(x);
>
> printf("ans = %lf\n",ans);
>
> }
>
> </snip test.c>
>
> keith@wis~>cc test.c
> /var/tmp/ccV145121.o: Undefined symbol `_sqrt' referenced from text segment
Type,
% cc -lm test.c -o test
This includes the math libraries. It is standard accross most UNICies.
--
Crist J. Clark cjclark@home.com
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902070050.TAA27981>
