//In Options.h
#ifndef _OPTIONS_
#define _OPTIONS_
struct Options
{
//blah
};
struct Options *GameOptions;
#endif
//elsewhere in winmain.cpp
#include "options.h"
//...
GameOptions = new Options;
//...
//in CObject.cpp
#include "options.h"
//...
Everything should work fine, right??? Compile, yes: link, no!
Nope, this error is returned.
Quote:
Object.obj : error LNK2005: "struct Options * GameOptions" (?GameOptions@@3PAUOptions@@A) already defined in winmain.obj
Has anyone had this problem before, or know how to fix it?