In my solution there are two projects,one is used as dll project,and one is client.
in my dll a class has a class static member,and i initilize it in .cpp file.
but i use this class static member in client project,it issue LINK error: fatal error LNK1120:
project dll:
Test.h:::::::::::::::::
class Test
{
public:
static const int var;
};
Test.cpp:::::::::::::::
const int Test::var = 1;
and project client:
#include "Test.h"
void main ()
{
std::cout<<Test::var;
}