Fix for using math library without Arduino (compiling from Makefile)

samduff

New member
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.

Code:
$(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.
 
Back
Top