Hi,
I have a c program that looks like bellow. In my main.c file, I have included: #include "test.h" main(){ test_init(); }
in my test.h file, I have a declaration static void test_init();
in my test.c file, I have a definition void test_init() { return 1; }
When I do compile, I see: compiling test.c... compiling main.c... linking... .\out\test.axf: Error: L6218E: Undefined symbol test_init(referred from main.o).
I've both declared and defined the function. But still see this error, any thoughts?
No, that's not what happened. The linker does not care at all where source files are.