Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

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

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    1

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

    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.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,968
    Opps, $(LIBS) is missing. I've added it here, so it'll be in Teensyduino 1.17.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •