У меня есть класс, который выглядит следующим образом:
//.h file
class __declspec(dllimport) MyClass
{
public:
//stuff
private:
static int myInt;
};
// .cpp file
int MyClass::myInt = 0;
Я получаю следующую ошибку компиляции:
error C2491: 'MyClass::myInt' : definition of dllimport static data member not allowed
что мне делать?