AnsweredAssumed Answered

Where does compiler/linker look for this *.obj file?

Question asked by SP Lee on Dec 1, 2010
Latest reply on Dec 1, 2010 by CrasyCat


I am using CW for MC9S08. I don't understand how the compiler/Linker look for the *.obj file.


I first created my project in CW with 2 source files, main.c and myfunc.c. After I MAKE, I purposely remove the myfunc.c from the project. However I leave the object files (main.c.o & myfunc.c.o) intact in my directory C:\Project1\Project1_Data\Standard\ObjectCode\


Then I MAKE again. It gives me a LINK error saying that particular function in myfunc.c is undefined.


Why is this so? I thought even if the myfunc.c is not included in the project, but as long as the previously compiled myfunc.c.o is present, the compiler/Linker should be able to find it?