title: what is the best way to initialize my global data in shared library?
body: <p>I have a single class which does all the required initialization.
  currently i have declared a global object of this class type, which is being instantiated on library load. 
  I've seen other ways, like delaring</p>
  
  <pre><code>BOOL APIENTRY DllMain
  </code></pre>
  
  <p>entry point for the shared library, and does the actual initialization on process attach.</p>
  
  <p>does this differ from letting the implicit global initialization to its job? which way is better?</p>