Tool/software: TI C/C++ Compiler
Before moving these function definitions, everything would compile fine. Now I am getting an unresolved symbols error and can't figure out why.
I moved 4 function definitions from one source file, lets say file1.c, to another source file, file2.c. I just cut and pasted these definitions, I did not make any changes at all.
I updated the corresponding header files file1.h and file2.h as well. I cut the function declarations from file1.h and pasted them into file2.h.
I then updated all other source files which previously referenced file1.h for the moved functions to instead reference file2.h.
2 out of the 4 functions that are now in file2.c cannot be found by the linker for some reason. The other 2 work fine. There aren't any noticeable differences between the 2 working and the 2 non-working functions. All 4 of these functions are pretty simple, less than 5 lines of code. Their definitions are of similar format too.
Now if I copy the 2 non-working function definitions from file2.c and paste them back into file1.c, everything works fine, even without updating file1.h or file2.h to reflect this change. The compiler doesn't complain about multiple definitions, even though both file1.c and file2.c contain 2 identical function definitions.
It seems as if the compiler doesn't see these 2 functions in file2.c for some reason.
I am using CCS Version: 6.1.0.00104. Please let me know if any more details are needed.
It may be worth noting that I renamed the project earlier that day as well, by going to File > Rename. I was able to compile after this though, with no problems.
Any ideas on what could be going on? Could some reference file be caching some old data that needs to be cleared?