From owner-freebsd-questions Sat Feb 6 19:07:42 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA25245 for freebsd-questions-outgoing; Sat, 6 Feb 1999 19:07:42 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from mail-out.visi.com (tele.visi.com [209.98.98.17]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA25173 for ; Sat, 6 Feb 1999 19:06:14 -0800 (PST) (envelope-from veldy@visi.com) Received: from isis.visi.com (isis.visi.com [209.98.98.8]) by mail-out.visi.com (Postfix) with ESMTP id 6BE3E1F855; Sat, 6 Feb 1999 21:06:08 -0600 (CST) Received: from localhost (veldy@localhost) by isis.visi.com (8.8.8/8.8.8) with SMTP id VAA06012; Sat, 6 Feb 1999 21:06:08 -0600 (CST) X-Authentication-Warning: isis.visi.com: veldy owned process doing -bs Date: Sat, 6 Feb 1999 21:06:07 -0600 (CST) From: "Thomas T. Veldhouse" To: cjclark@home.com Cc: keith@apcs.com.au, questions@FreeBSD.ORG Subject: Re: math.h ? In-Reply-To: <199902070050.TAA27981@cc942873-a.ewndsr1.nj.home.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Don't use test as your output binary. There is a system program called test, and if you have . in you path, you may not figure out why your program is not working. Tom Veldhouse veldy@visi.com On Sat, 6 Feb 1999, Crist J. Clark wrote: > 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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message