Original Post
class EXPORT_API StaticScriptState
{
protected:
static lua_State* L;
}
// ...and in a .cpp file in the .dll:
lua_State* StaticScriptState::L = NULL;
client.obj : error LNK2001: unresolved external symbol "protected: static lua_State * StaticScriptState::L" (?L@StaticScriptState@@1PAXA)I have tried to define the symbol in the client application to and then it works to compile but what happens is that two seperate static variables are created (one for the client and one for the DLL). Does anyone have any idea about how to solve this? (BTW, the variable need to be static because it''s used by static functions in classes that inherit from StaticScriptState).