Original Post
I''m not a newbit to link errors or MSVC++, but I''m having a problem that is really annoying the crap out of me.
I want to have an include file with a couple of global variables, and multiple source files in my project need to use these variables. The problem is that whenever more than one source file includes this global.h file, it gives me link errors stating that the variables were already defined earlier. I tried to fix this by doing something like this:
#ifndef GLOBAL_H
#define GLOBAL_H
//global definitions
#endif
Unfortunately, this did not help at all. Now I''m thinking that I will need to find a setting in MSVC that fix this problem for me. This has happened to me in every project for years now that I''ve tried to use global variables in. Thanks in advance to anyone that can solve this problem for me.
Mike Griffin
griff@umr.edu