   Getting multiple instances of a static object (C++)
  Basically, it's a namespace that contains a static member.namespace nMngr{   static nGfx::Mngr   stGfx;   };I started having some problems when I used this member, and after further researching, it seems I had duplicate symbols that my compiler didnt tell me about.  A suggestion was given that I turned 'stGfx' into a singleton, but I was wondering if there were better alternatives.   
  static, when used like that, means local to translation unit, i.e. each cpp file gets it's own (completely independant) copy of the object.  (Such use also happens to be deprecated in favour of unnamed namespaces).  If this is not what you want then the quick fix is to declare it extern in the header and implement it in a cpp file.  I'll leave it to other to wax lyrical on the benefits or lack-thereof of the design and/or singletons since it's very late and I'm off to bed.Enigma   ;  Singletons suck, blah blah blah...static has different meaning in the namespace context and the class context.You probably want://header file:namespace nMngr {    extern nGfx::Mngr stGfx;}//in code using stGfx:#include "header.hpp"void foo () {   nMngr::stGfx.bar();}//in one (1) source file:namespace nMngr {    nGfx::Mngr stGfx;}I'm no fan of globals either, but I'm too lazy to articulate my global-context-hatred into a well thought out argument. But singletons are no better (if anything they're worse) - so I might as well show the proper way to do globals accessed accross multiple translation units :-).   