title: Proper usage of static class members
body: <p>What is the proper way of having static class members?</p>
  
  <p>I am trying to create a metrics class so that I can include "metrics.h" in all of my files, and use certain variables from it (the static ones) to keep track of timing information across multiple separately compiled libraries. </p>
  
  <p>One of these libraries is common to all of the other ones, so when I am compiling it, with metrics.h, it compiles fine, but when I am trying to compile one of the additional libraries that uses common, I get "multiple definition" errors, as well as some undefined references.</p>
  
  <p>What should this common metrics class look like? I dont want to have to instantiate it to user the variables, I just want to use something like</p>
  
  <p>Metrics::startTime = ....</p>
  
  <p>and Metrics::calcTime = ....</p>
  
  <p>in either the common library, or one of theo ther libraries that links to common</p>