template static classes across dynamic linked libraries
- by user322274
Hello, I have a templated class with a static value, like this:
template <class TYPE>
class A{
static TYPE value;
};
in the code of a dll I assign the static value:
code of DLL_1
A<float>::value = 2.0;
I wish the value to be shared by all the dlls I'm using, i.e. I want that:
code of DLL_2
printf("value on DLL_2 %f",A<float>::value);
print out "2.0"
any clues?
thx