The only reason C is not referenced is because the compiler thinks it needs the Foo character.
Since C is not a Foo symbol, there must be another reason why the linker needs a symbol.
The only reason I know is because of some kind of export. I only know Visual C ++, so I suggest you find some equivalent __declspec( dllexport )
in the pre-processed files and see what generates it.
Here's what I would do: have the preprocessor output stored in a separate file and look for its occurrence Foo. Either this will happen as an export, or the compiler was somehow specified.
source share