I just ran into this problem: I know I have this file in my project, but still the linker complains that it cannot find the symbols: “Symbol X is undefined”? It must be something obvious, but somehow I cannot see it?
I know all these things are in my Events.c file, and it is part of my project:
The linker does not have Events_c.obj file listed in the Console view. The console at least tells me what the linker is using:
"C:/Freescale/CW MCU v10.2/MCU/prog/linker" -ArgFile"SRB.args" -O"SRB.abs" "C:/Users/Erich Styger/Data/HTA/CW/wsp_Intro/SRB_Ref/Project_Settings/Linker_Files/ProcessorExpert.prm" Command Line: '-ArgFile"SRB.args" -O"SRB.abs"' ....
So the *.args file has the arguments. The external .args file helps the linker to deal with the host operating system command line length limitiation. Inspectinig the .args file indeed does not have Events_c.obj listed.
So indeed, the file is not part of my build. Maybe I screwed up something? Yes, I was working on build configurations, have added configurations and removed them again. Maybe this caused the problem? And yes, indeed, I noticed the tiny icon decorator change for my file, indicating that my file indeed has special settings:
Using the ‘Reset to Default…’ is removing the settings:
Now I see as well the cause of the troubles: the file is excluded from the build:
Ah, OK! I did not pay attention to the icon decorator. Now the fix is easy. The file is part of my project, but not part of my build :-(. Although including means you have to select ‘Exclude‘ again:
This gives me the following dialog, where I need to un-check it to have it back included in the build:
Another ways is to use the ‘Properties’ menu on that file:
Note: In case you exclude the Batch Burner File (burner. bbl) from the build, then the S19 file will not be generated. So if you want that S19 file, and it is not built, you might check if you have excluded the burner.bbl from the build configuration.
Happy Excluding & Including 🙂