Hi,
I'm linking into a library that has a global constant with the same
name as one in my application. My references to the constant are
being linked to the value in the library instead of the one in my
source file. Both constants are extern so I'm assuming it's undefined
which value I get. Obviously this is one of the reasons why global
constants are usually a bad idea.
I'm considering using a namespace to better encapsulate my constant
values. However, I'm working on a huge application with many
constants, which are used all over the place. So this would be a
significant change. Is this the best long term solution? Are there
other patterns for encapsulating constant values?
Thanks,
Will