From owner-freebsd-questions Sat Feb 6 16:49:15 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA14744 for freebsd-questions-outgoing; Sat, 6 Feb 1999 16:49:15 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA14739 for ; Sat, 6 Feb 1999 16:49:12 -0800 (PST) (envelope-from cjc@cc942873-a.ewndsr1.nj.home.com) Received: (from cjc@localhost) by cc942873-a.ewndsr1.nj.home.com (8.8.8/8.8.8) id TAA27981; Sat, 6 Feb 1999 19:50:35 -0500 (EST) (envelope-from cjc) From: "Crist J. Clark" Message-Id: <199902070050.TAA27981@cc942873-a.ewndsr1.nj.home.com> Subject: Re: math.h ? In-Reply-To: from Keith Anderson at "Feb 7, 99 11:32:38 am" To: keith@apcs.com.au Date: Sat, 6 Feb 1999 19:50:35 -0500 (EST) Cc: questions@FreeBSD.ORG Reply-To: cjclark@home.com X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 > > > #include > > main () > { > double x = 64; > double ans; > ans = sqrt(x); > > printf("ans = %lf\n",ans); > > } > > > > 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