in the C file:
#include "sntp.h"
sntp_start_auto_time_sync( 1 * DAYS );
in the makefile:
$(NAME)_COMPONENTS := protocols/sntp
Compiles fine, but the linker cannot find the function I called: "undefined reference to `sntp_start_auto_time_sync'"
I looked in the build directory (Modules/Library/protocols/sntp) and I can see the snap.o file, compiled at the right timestamp.
The .o contains the string "sntp_start_auto_time_sync"
What's missing? What other info does the linker need?
[Update: If I run make clean, and then try again, the compilation is successful. Why?]
I changed this from a question to "tip": Linker issues can be resolved by cleaning the build environment.