Anonymous
Not applicable
Oct 13, 2014
09:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 13, 2014
09:29 PM
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?]
1 Reply
Anonymous
Not applicable
Oct 14, 2014
11:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 14, 2014
11:34 AM
I changed this from a question to "tip": Linker issues can be resolved by cleaning the build environment.