From owner-freebsd-questions Sun Oct 25 01:22:37 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA21524 for freebsd-questions-outgoing; Sun, 25 Oct 1998 01:22:37 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA21517 for ; Sun, 25 Oct 1998 01:22:29 -0800 (PST) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id TAA05390; Sun, 25 Oct 1998 19:51:38 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.1/8.9.0) id TAA17877; Sun, 25 Oct 1998 19:51:38 +1030 (CST) Message-ID: <19981025195138.U16609@freebie.lemis.com> Date: Sun, 25 Oct 1998 19:51:38 +1030 From: Greg Lehey To: Brendan Kosowski , FreeBSD Questions Subject: Re: Problem with C compile on FreeBSD 2.2.5 References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: ; from Brendan Kosowski on Sun, Oct 25, 1998 at 08:16:25PM +1100 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sunday, 25 October 1998 at 20:16:25 +1100, Brendan Kosowski wrote: > > The C compiler on FreeBSD 2.2.5 will not let me comile an ANSI-C program > that works fine on other ANSI-C compilers. > > The problem is with the trig. functions ( ie. sin, asin, etc... ). > > It says something like undefined symbol "_sin" referenced from text > segment. *Please* give details. I don't want to see "something like", I want to see the real thing. In this case, though, the answer is simple. Your program is compiling fine, but it's not linking. You need to include the math library. -lm. Other ANSI C compilers require this too. Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message