Inclusion Error in VC++
I though some variables into a header file that I call many times. The header file has inclusion guards on it and yet it keeps saying 3 times the object are allready declared. I had this problem before but I forgot the trick to fix it. Can someone help.
Yes one thing is you might have multiple cpp, c and or .h files that somehow include the header file more than once, best thing I can recommend is to check all your source files to see if you find a header file declared more than once.
- BlueDev
- BlueDev
Well, if I guess right, then you are defining objects in the header file. This should be avoided. Rather, declare your objects as extern in the header and define them properly in one of your .cpp files.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement