Hallo,
ich bin grad dabei mich mit DirectX und Engine-Systemen zu beschäftigen und benutze als speicherung der Objekte ein STL-Array(vector), welches in der Header 'psObject.h' steht:
|
C-/C++-Quelltext
|
1
|
vector<psObjectI> ps_objects;
|
Diese Header wird von einer Main-Header(psEngine.h) eingebunden.
Diese wiederrum wird von allen Cpp-Dateien eingebunden.
Allerdings kommen jetzt folgende Linker-Fehlermeldungen:
|
Quellcode
|
1
2
3
4
5
|
1>psCamera.obj : error LNK2005: "class std::vector<class psObjectI,class std::allocator<class psObjectI> > ps_objects" (?ps_objects@@3V?$vector@VpsObjectI@@V?$allocator@VpsObjectI@@@std@@@std@@A) ist bereits in main.obj definiert.
1>psEngine.obj : error LNK2005: "class std::vector<class psObjectI,class std::allocator<class psObjectI> > ps_objects" (?ps_objects@@3V?$vector@VpsObjectI@@V?$allocator@VpsObjectI@@@std@@@std@@A) ist bereits in main.obj definiert.
1>psLight.obj : error LNK2005: "class std::vector<class psObjectI,class std::allocator<class psObjectI> > ps_objects" (?ps_objects@@3V?$vector@VpsObjectI@@V?$allocator@VpsObjectI@@@std@@@std@@A) ist bereits in main.obj definiert.
1>psMaterial.obj : error LNK2005: "class std::vector<class psObjectI,class std::allocator<class psObjectI> > ps_objects" (?ps_objects@@3V?$vector@VpsObjectI@@V?$allocator@VpsObjectI@@@std@@@std@@A) ist bereits in main.obj definiert.
1>psObject.obj : error LNK2005: "class std::vector<class psObjectI,class std::allocator<class psObjectI> > ps_objects" (?ps_objects@@3V?$vector@VpsObjectI@@V?$allocator@VpsObjectI@@@std@@@std@@A) ist bereits in main.obj definiert.
|
Ich benutze MS Visual Cpp 2008 Express.
Vielen Dank im vorraus.
Lg.