In a program I'm working on, I have a header file which defines some structs. In that same header file I have 2 pointers:
I want to use these pointers globally throughout the program, so that wherever I include the header file, I have access to them. However, while linking I get these errors:Code:Window* gwindow; // global pointer to core Window obj Settings* gsettings; // global pointer to core Settings obj
multiple definition of `gwindow'
first defined here
multiple definition of `gsettings'
first defined here
It must say that about 5 times each for gwindow and gsettings. What does this mean? I'm guessing everytime I include the file, it redefines the the pointer or something? How do I get around this?



LinkBack URL
About LinkBacks


