Well, there's a very simple explanation. const definitions are code, and gcc stops precompiling headers when it reaches the first line of code. Precompiled headers are applied as a prefix to every source file in your target. So if gcc emitted code for these const definitions in the pch, you'd have multiple definitions of the constants, one for every source file. The linker wouldn't like that. You have two choices: 1) Use macros instead of const declarations. 2) Declare the consts as "extern" in your precompiled header, and do the formal definitions in a single source file in your build (not in a header file or the prefix file).
You have two choices: