Comment by iasay

3 years ago

This is wrong.

It belongs in the linker and you can pull the symbol it creates in with extern. I’ve been doing this for about 25 years.

...and now your solution is non-portable and as a cross-platform developer you need to implement N different build scripts. This is far more elegant.