Hi all,
I have this piece of code
#ifndef GUIUtil__
#define GUIUtil__
/*
CEGUI_Util namespace defines the GUIUtil namespace, where utility functions which does not
belong to classes are defined here.
Include this file after all CEGUI includes
*/
namespace GUIUtil
{
// Load in a layout specified by layoutFileName, and load it into
// destWindow
void loadLayout(char * layoutFileName, CEGUI::Window* destWindow)
{
CEGUI::WindowManager* Wmgr = CEGUI::WindowManager::getSingletonPtr();
destWindow = Wmgr->loadWindowLayout(layoutFileName);
}
};
#endif
Which I include in every other classes. When I complied, however, I keep getting:
Quote:
GUIController.obj : error LNK2005: "void __cdecl GUIUtil::loadLayout(char *,class CEGUI::Window *)" (?loadLayout@GUIUtil@@YAXPADPAVWindow@CEGUI@@@Z) already defined in GUIBlackBox.obj
GUIGroup.obj : error LNK2005: "void __cdecl GUIUtil::loadLayout(char *,class CEGUI::Window *)" (?loadLayout@GUIUtil@@YAXPADPAVWindow@CEGUI@@@Z) already defined in GUIBlackBox.obj
Program.obj : error LNK2005: "void __cdecl GUIUtil::loadLayout(char *,class CEGUI::Window *)" (?loadLayout@GUIUtil@@YAXPADPAVWindow@CEGUI@@@Z) already defined in GUIBlackBox.obj
Tutorial_1.obj : error LNK2005: "void __cdecl GUIUtil::loadLayout(char *,class CEGUI::Window *)" (?loadLayout@GUIUtil@@YAXPADPAVWindow@CEGUI@@@Z) already defined in GUIBlackBox.obj
I'm quite sure I have include guards...is there any other thing I shall check for the cause of this error/