私は以下のようなクラスを持っています:
//.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
私は何をすべきか?