nanogui: Re: [nanogui] Re: undefined reference problem solved


Previous by date: 27 Apr 2004 15:12:07 +0100 Which way to go on?, Takács Áron
Next by date: 27 Apr 2004 15:12:07 +0100 Re: undefined reference to mousedev., tj
Previous in thread:
Next in thread:

Subject: Re: [nanogui] Re: undefined reference problem solved
From: Takács ####@####.####
Date: 27 Apr 2004 15:12:07 +0100
Message-Id: <200404271549.05606.takacs.aron@infracont.hu>

> 
> Hi,
> 
> >Compiling nxroach.c ...
> >nxroach.o: In function `main':
> >nxroach.o(.text+0x170): undefined reference to `sin'
> >nxroach.o(.text+0x184): undefined reference to `cos'
> 
> sin and cos are defined in libm.  Add "-lm" to the link line.
> 
> Kind regards,
> 
> Jon Foster
> --
The problem could be solved by modifying some Makefiles:

LDFLAGS += -lm

In the Tools targets section the $(LDFLAGS) flag must be at the END of the 
line (too):
This line gives an error:

$(TOP)/bin/nxroach: $(OBJS) $(NANOXCLIENTLIBS) $(TOP)/config
	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(NANOXCLIENTLIBS) 

This line not:

$(TOP)/bin/nxroach: $(OBJS) $(NANOXCLIENTLIBS) $(TOP)/config
	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(NANOXCLIENTLIBS) $(LDFLAGS)

Thank you for your help!

Áron Takács

Previous by date: 27 Apr 2004 15:12:07 +0100 Which way to go on?, Takács Áron
Next by date: 27 Apr 2004 15:12:07 +0100 Re: undefined reference to mousedev., tj
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.