I added a src folder inside the main folder, then inside my .c and .h.
In my main program, I added my library this way: include "src/xxxxxh"
When I start building with make flash, the program compiles but fail to link. I don-t see in the build folder my libraries. according to the component.mk file, as long as I use a folder named "src", everything should work. But it doesnt. Am I missing some config file?
Code: Select all
jorge@jorge-Inspiron-7559:~/esp/modem-wifi-sigfox$ make flash
Toolchain path: /home/jorge/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a
Compiler version: 5.2.0
Python requirements from /home/jorge/esp/esp-idf/requirements.txt are satisfied.
App "app-template" version: e66e153-dirty
CC build/main/main.o
AR build/main/libmain.a
Generating libmain.a.sections_info
Generating esp32.project.ld
LD build/app-template.elf
/home/jorge/esp/modem-wifi-sigfox/build/main/libmain.a(main.o):(.literal.app_main+0x14): undefined reference to `jtz_sigfox_init'
/home/jorge/esp/modem-wifi-sigfox/build/main/libmain.a(main.o): In function `app_main':
/home/jorge/esp/modem-wifi-sigfox/main/main.c:80: undefined reference to `jtz_sigfox_init'
collect2: error: ld returned 1 exit status
/home/jorge/esp/esp-idf/make/project.mk:482: recipe for target '/home/jorge/esp/modem-wifi-sigfox/build/app-template.elf' failed
make: *** [/home/jorge/esp/modem-wifi-sigfox/build/app-template.elf] Error 1
jorge@jorge-Inspiron-7559:~/esp/modem-wifi-sigfox$