Hello. I have an AI-Deck and a Crazyflie 2.1 and I am using the GAP SDK from the docker image. Flashing to the board and running simple code and the examples run fine, following the instructions from the documentation. Now, I want to run some algorithm I had running on my computer, which includes math.h (more specifically, it uses sqrt() and log()), and then I am getting this "undefined reference to <function>" error when compiling.
What should I do to get those to work?
Undefined reference to functions in math.h etc
Re: Undefined reference to functions in math.h etc
I added "LIBSFLAGS += -lm" to my Makefile and now it works.
Re: Undefined reference to functions in math.h etc
Sorry for the late reply! A lot of us were on vacation still last week.
Great you were able to solve it on your own! It needs to be included in the makefile indeed if you use any external libraries.
Great you were able to solve it on your own! It needs to be included in the makefile indeed if you use any external libraries.