View Full Version : Fix for using math library without Arduino (compiling from Makefile)

10-09-2013, 11:06 AM
I had an issue building code with the makefile after including <math.h>. I think it's just a mistake in the following lines, I've added $(LIBS) to the end of the second line.

$(TARGET).elf: $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

LIBS is already defined as "-lm", which is the extra option I needed to fix the compile error.

10-09-2013, 01:51 PM
Opps, $(LIBS) is missing. I've added it here, so it'll be in Teensyduino 1.17.