This is the mail archive of the
mailing list for the GCC project.
Re: problems with math.h of gcc
- To: benbasat_david at hotmail dot com
- Subject: Re: problems with math.h of gcc
- From: degger at fhm dot edu
- Date: Sat, 10 Nov 2001 00:12:24 +0100 (CET)
- Cc: gcc at gcc dot gnu dot org
- Reply-To: degger at fhm dot edu
On 9 Nov, david benbasat wrote:
> I understand that you have some experience in this field.
> When I run a program with trigonometric function like sin, tan etc..
> I get errors: undefined reference to sin
> undefined reference to tan
> What should I do?
Compile it with:
gcc foo.c -o foo -lm
Though this question is not really gcc related and probably better
suited for some "Introduction to C programming" book.