Variables in static library are never initialized. Why?
- by Coyote
I have a bunch of variables that should be initialized then my game launches, but must of them are never initialized.
Here is an example of the code:
MyClass.h
class MyClass : public BaseObject {
DECLARE_CLASS_RTTI(MyClass, BaseObject);
...
};
MyClass.cpp
REGISTER_CLASS(MyClass)
Where REGISTER_CLASS is a macro defined as follow
…