Closed jerryneedell closed 1 year ago
compiling the pico_lorawan_otaa_temperature_led example failed with the following error also see #32
many lines removed /Users/jerryneedell/projects/pico-lorawan/src/lorawan.c: In function 'lorawan_process_timeout_ms': /Users/jerryneedell/projects/pico-lorawan/src/lorawan.c:297:36: warning: implicit declaration of function 'make_timeout_time_ms' [-Wimplicit-function-declaration] 297 | absolute_time_t timeout_time = make_timeout_time_ms(timeout_ms); | ^~~~~~~~~~~~~~~~~~~~ /Users/jerryneedell/projects/pico-lorawan/src/lorawan.c:309:15: warning: implicit declaration of function 'best_effort_wfe_or_timeout' [-Wimplicit-function-declaration] 309 | } while (!best_effort_wfe_or_timeout(timeout_time)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ many lines removed /Users/jerryneedell/bin/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: CMakeFiles/pico_lorawan_otaa_temperature_led.dir/__/__/src/lorawan.c.obj: in function `lorawan_process_timeout_ms': lorawan.c:(.text.lorawan_process_timeout_ms+0xa): undefined reference to `make_timeout_time_ms' collect2: error: ld returned 1 exit status make[2]: *** [examples/otaa_temperature_led/pico_lorawan_otaa_temperature_led.elf] Error 1 make[1]: *** [examples/otaa_temperature_led/CMakeFiles/pico_lorawan_otaa_temperature_led.dir/all] Error 2 make: *** [all] Error 2
adding `#include "pico/time.h" to lorawan.c appears to fix the problem.
It now compiles OK.
@jerryneedell thanks for taking the time to make this pull request!
You're welcome. Thank you for all your great code examples!
compiling the pico_lorawan_otaa_temperature_led example failed with the following error also see #32
adding `#include "pico/time.h" to lorawan.c appears to fix the problem.
It now compiles OK.