Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Oct 1998 19:51:38 +1030
From:      Greg Lehey <grog@lemis.com>
To:        Brendan Kosowski <brendan@bmk.com.au>, FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Problem with C compile on FreeBSD 2.2.5
Message-ID:  <19981025195138.U16609@freebie.lemis.com>
In-Reply-To: <Pine.BSF.3.96.981025200814.7576A-200000@garfield>; from Brendan Kosowski on Sun, Oct 25, 1998 at 08:16:25PM %2B1100
References:  <Pine.BSF.3.96.981025200814.7576A-200000@garfield>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981025195138.U16609>