K
Kostatus
I'm trying to use STL maps with VC++ 6 .
I already have 2 different types of maps working fine,
but a new one that I've just added refuses to work
Instead of some reasonable explanation the compiler gives
me the following mumble-jumble:
Dungeon.obj : error LNK2005: "class std::map<unsigned short,int,struct
std::less<unsigned short>,class std::allocator<int> > siMap"
(?siMap@@3V?$map@GHU?$less@G@std@@V?$allocator@H@2@@std@@A) already defined
in Digger.obj
DungOperations.obj : error LNK2005: "class std::map<unsigned
short,int,struct std::less<unsigned short>,class std::allocator<int> >
siMap" (?siMap@@3V?$map@GHU?$less@G@std@@V?$allocator@H@2@@std@@A) already
defined in Digger.obj
Fov.obj : error LNK2005: "class std::map<unsigned short,int,struct
std::less<unsigned short>,class std::allocator<int> > siMap"
(?siMap@@3V?$map@GHU?$less@G@std@@V?$allocator@H@2@@std@@A) already defined
in Digger.obj
Game.obj : error LNK2005: "class std::map<unsigned short,int,struct
std::less<unsigned short>,class std::allocator<int> > siMap"
(?siMap@@3V?$map@GHU?$less@G@std@@V?$allocator@H@2@@std@@A) already defined
in Digger.obj
Global.obj : error LNK2005: "class std::map<unsigned short,int,struct
std::less<unsigned short>,class std::allocator<int> > siMap"
(?siMap@@3V?$map@GHU?$less@G@std@@V?$allocator@H@2@@std@@A) already defined
in Digger.obj
Ibj : error LNK2005: "class std::map<unsigned short,int,struct
std::less<unsigned short>,class std::allocator<int> > siMap"
(?siMap@@3V?$map@GHU?$less@G@std@@V?$allocator@H@2@@std@@A) already defined
in Digger.obj
Debug/game.exe : fatal error LNK1169: one or more multiply defined symbols
found
Error executing link.exe.
I have no idea how to fix this or interpret it and I do not
want to replace the map with a usual array unless it's
completely necessary. Can anyone help me?
I already have 2 different types of maps working fine,
but a new one that I've just added refuses to work
Instead of some reasonable explanation the compiler gives
me the following mumble-jumble:
Dungeon.obj : error LNK2005: "class std::map<unsigned short,int,struct
std::less<unsigned short>,class std::allocator<int> > siMap"
(?siMap@@3V?$map@GHU?$less@G@std@@V?$allocator@H@2@@std@@A) already defined
in Digger.obj
DungOperations.obj : error LNK2005: "class std::map<unsigned
short,int,struct std::less<unsigned short>,class std::allocator<int> >
siMap" (?siMap@@3V?$map@GHU?$less@G@std@@V?$allocator@H@2@@std@@A) already
defined in Digger.obj
Fov.obj : error LNK2005: "class std::map<unsigned short,int,struct
std::less<unsigned short>,class std::allocator<int> > siMap"
(?siMap@@3V?$map@GHU?$less@G@std@@V?$allocator@H@2@@std@@A) already defined
in Digger.obj
Game.obj : error LNK2005: "class std::map<unsigned short,int,struct
std::less<unsigned short>,class std::allocator<int> > siMap"
(?siMap@@3V?$map@GHU?$less@G@std@@V?$allocator@H@2@@std@@A) already defined
in Digger.obj
Global.obj : error LNK2005: "class std::map<unsigned short,int,struct
std::less<unsigned short>,class std::allocator<int> > siMap"
(?siMap@@3V?$map@GHU?$less@G@std@@V?$allocator@H@2@@std@@A) already defined
in Digger.obj
Ibj : error LNK2005: "class std::map<unsigned short,int,struct
std::less<unsigned short>,class std::allocator<int> > siMap"
(?siMap@@3V?$map@GHU?$less@G@std@@V?$allocator@H@2@@std@@A) already defined
in Digger.obj
Debug/game.exe : fatal error LNK1169: one or more multiply defined symbols
found
Error executing link.exe.
I have no idea how to fix this or interpret it and I do not
want to replace the map with a usual array unless it's
completely necessary. Can anyone help me?