I am having trouble compiling a project which is including a static library (a ".a" file).
When I make the project I get those two errors :
Code: Select all
componentpath/lib/xtensa-esp32-elf/mylib.a(user.o): In function `delete_user':
user.c:(.text.delete_user+0x5): dangerous relocation: call8: call target out of range: free
componentpath/lib/xtensa-esp32-elf/mylib.a(user.o): In function `user_create':
user.c:(.text.user_create+0x5): dangerous relocation: call8: call target out of range: malloc
Here is my project tree.
- components
- MyComponent
- include
- library headers
- lib
- xtensa-esp32-elf
- mylib.a
- xtensa-esp32-elf
- component.mk
- COMPONENT_ADD_LDFLAGS=$(COMPONENT_PATH)/lib/xtensa-esp32-elf/mylib.a -l$(COMPONENT_NAME)
- include $(IDF_PATH)/make/component_common.mk
- mycomp.c
- include
- MyComponent
- main
- main.c
- component.mk => include $(IDF_PATH)/make/component_common.mk
- Makefile => include $(IDF_PATH)/make/project.mk