G
Guest
what is meaning of this? (MS VC++ .NET)
----------------------
Linking...
machine.obj : error LNK2001: unresolved external symbol "private: static class std::vector<struct GessoidMachine::Resolution,class
std::allocator<struct GessoidMachine::Resolution> > GessoidMachine::Machine::resolution"
(?resolution@Machine@GessoidMachine@@0V?$vector@UResolution@GessoidMachine@@V?$allocator@UResolution@GessoidMachine@@@std@@@std@@A)
machine.obj : error LNK2001: unresolved external symbol "private: static struct SDL_Surface * GessoidMachine::Machine::screen"
(?screen@Machine@GessoidMachine@@0PAUSDL_Surface@@A)
machine.obj : error LNK2001: unresolved external symbol "private: static int GessoidMachine::Machine::resolution_index"
(?resolution_index@Machine@GessoidMachine@@0HA)
..\Debug/main.exe : fatal error LNK1120: 3 unresolved externals
----------------------
The error is in this code: (All member functions & data are static because I want only one instance of "Machine" in my project and I
want access in any data member without this->
----------------------
class Machine {
public:
static member1(arg1, arg2);
static member2();
.......
private:
// handle all resolutions supported from system
static vector <Resolution> resolution;
static int resolution_index;
static SDL_Surface *screen;
};
----------------------
----------------------
Linking...
machine.obj : error LNK2001: unresolved external symbol "private: static class std::vector<struct GessoidMachine::Resolution,class
std::allocator<struct GessoidMachine::Resolution> > GessoidMachine::Machine::resolution"
(?resolution@Machine@GessoidMachine@@0V?$vector@UResolution@GessoidMachine@@V?$allocator@UResolution@GessoidMachine@@@std@@@std@@A)
machine.obj : error LNK2001: unresolved external symbol "private: static struct SDL_Surface * GessoidMachine::Machine::screen"
(?screen@Machine@GessoidMachine@@0PAUSDL_Surface@@A)
machine.obj : error LNK2001: unresolved external symbol "private: static int GessoidMachine::Machine::resolution_index"
(?resolution_index@Machine@GessoidMachine@@0HA)
..\Debug/main.exe : fatal error LNK1120: 3 unresolved externals
----------------------
The error is in this code: (All member functions & data are static because I want only one instance of "Machine" in my project and I
want access in any data member without this->
----------------------
class Machine {
public:
static member1(arg1, arg2);
static member2();
.......
private:
// handle all resolutions supported from system
static vector <Resolution> resolution;
static int resolution_index;
static SDL_Surface *screen;
};
----------------------