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?
Hi actually i was also facing the same issue. In my case what happened is iI kept the driver source files and inlcude files in the other folder thats why linker was not able to link them. Then i cpoied every single file into the project filder and also i gave path of that folder by going into the option folder and then c/c++ and then include path option.
No, that's not what happened. The linker does not care at all where source files are.