This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

about the link error with arm-none-eabi on the eclipse environment.

Hello all

I'm struggling with link errors, "undefined referencce atan2" as well as all math library. I still dont know why it is occurred these errors. I configured the eclipse compile environment with the gnu arm tool using your doc, application note ver1.2. May you help me?

Parents
  • You're right, I see the same when I tried this modification. To make it work, I had to add -lm to the linking command line. Beware that the place in the line actually matters, but things seemed to work when I put it right before the -o parameter in the final linking: $(CC) $(LDFLAGS) $(C_OBJECTS) $(ASSEMBLER_OBJECTS) $(LIBRARIES) -lm -o $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out

Reply
  • You're right, I see the same when I tried this modification. To make it work, I had to add -lm to the linking command line. Beware that the place in the line actually matters, but things seemed to work when I put it right before the -o parameter in the final linking: $(CC) $(LDFLAGS) $(C_OBJECTS) $(ASSEMBLER_OBJECTS) $(LIBRARIES) -lm -o $(OUTPUT_BINARY_DIRECTORY)/$(OUTPUT_FILENAME).out

Children
Related