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<unsign ed short,int,struc t
std::less<unsig ned short>,class std::allocator< int> > siMap"
(?siMap@@3V?$ma p@GHU?$less@G@s td@@V?$allocato r@H@2@@std@@A) already defined
in Digger.obj
DungOperations. obj : error LNK2005: "class std::map<unsign ed
short,int,struc t std::less<unsig ned short>,class std::allocator< int> >
siMap" (?siMap@@3V?$ma p@GHU?$less@G@s td@@V?$allocato r@H@2@@std@@A) already
defined in Digger.obj
Fov.obj : error LNK2005: "class std::map<unsign ed short,int,struc t
std::less<unsig ned short>,class std::allocator< int> > siMap"
(?siMap@@3V?$ma p@GHU?$less@G@s td@@V?$allocato r@H@2@@std@@A) already defined
in Digger.obj
Game.obj : error LNK2005: "class std::map<unsign ed short,int,struc t
std::less<unsig ned short>,class std::allocator< int> > siMap"
(?siMap@@3V?$ma p@GHU?$less@G@s td@@V?$allocato r@H@2@@std@@A) already defined
in Digger.obj
Global.obj : error LNK2005: "class std::map<unsign ed short,int,struc t
std::less<unsig ned short>,class std::allocator< int> > siMap"
(?siMap@@3V?$ma p@GHU?$less@G@s td@@V?$allocato r@H@2@@std@@A) already defined
in Digger.obj
IO.obj : error LNK2005: "class std::map<unsign ed short,int,struc t
std::less<unsig ned short>,class std::allocator< int> > siMap"
(?siMap@@3V?$ma p@GHU?$less@G@s td@@V?$allocato r@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<unsign ed short,int,struc t
std::less<unsig ned short>,class std::allocator< int> > siMap"
(?siMap@@3V?$ma p@GHU?$less@G@s td@@V?$allocato r@H@2@@std@@A) already defined
in Digger.obj
DungOperations. obj : error LNK2005: "class std::map<unsign ed
short,int,struc t std::less<unsig ned short>,class std::allocator< int> >
siMap" (?siMap@@3V?$ma p@GHU?$less@G@s td@@V?$allocato r@H@2@@std@@A) already
defined in Digger.obj
Fov.obj : error LNK2005: "class std::map<unsign ed short,int,struc t
std::less<unsig ned short>,class std::allocator< int> > siMap"
(?siMap@@3V?$ma p@GHU?$less@G@s td@@V?$allocato r@H@2@@std@@A) already defined
in Digger.obj
Game.obj : error LNK2005: "class std::map<unsign ed short,int,struc t
std::less<unsig ned short>,class std::allocator< int> > siMap"
(?siMap@@3V?$ma p@GHU?$less@G@s td@@V?$allocato r@H@2@@std@@A) already defined
in Digger.obj
Global.obj : error LNK2005: "class std::map<unsign ed short,int,struc t
std::less<unsig ned short>,class std::allocator< int> > siMap"
(?siMap@@3V?$ma p@GHU?$less@G@s td@@V?$allocato r@H@2@@std@@A) already defined
in Digger.obj
IO.obj : error LNK2005: "class std::map<unsign ed short,int,struc t
std::less<unsig ned short>,class std::allocator< int> > siMap"
(?siMap@@3V?$ma p@GHU?$less@G@s td@@V?$allocato r@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?
Comment