Is this in a header? If so that may be the problem, it needs to be in a source file, not a header. Why? Because if you include the header it's in into two different source files, the symbol will get included into both of them and declared for both of their output files, and you'll get the error you did, because the symbol exists twice for the linker.