Original Post
Hi,
I''m getting link errors when I''m using a static std::list as a member variable in my class. Completely stumped ..
Example:
class CTest
{
public:
CTest () { };
~CTest() { };
static std::vector list;
};
static CTest test;
int main( )
{
test.list.push_back( 1 );
}
I get the following link error:
"error LNK2001: unresolved external symbol "public: static class std::vector > CTest::list" (?list@CTest@@2V?$vector@HV?$allocator@H@std@@@std@@A)"
It links fine when I remove the static declaration in front of the std::vector though.
Anyone have a clue?
Thanks