This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: problems with math.h of gcc


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
>               etc..
> 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.

--
Servus,
       Daniel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]