This is a bit of an embarrassing "feature" of C++: you need to do some hand holding to make sure the linker can generate the symbols. You need to choose some cpp
file, and make sure that no such handholding occurs for the same symbols in any other (otherwise the linker will fail when it encounters duplicate symbols). So you have to do another declaration of the static member variables for your class in the cpp
file like this:
std::string * Test::sp; // or sp = NULL;