Hi Sven,

--- Sven Johnsson wrote:

> Hello,
> 
> I am trying to compile a simple application that
> uses the sin()
> function. I have included the math.h header file and
> compiled using the
> -lm option.
> When compiling, I get:
> ...undefined reference to `sin' .
> 
> It works fine when I compile for the host system.
> 
> How can I make this work?
> 

Did you also add -lm to the Makefile?  For example,

$(EXEC): $(OBJS)
        $(CC) $(LDFLAGS) -o $@ $(OBJS) -lm $(LDLIBS)


Regards,
...doug


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to