When you have static
members in a class
, you have to define it in a translation unit.
In your header:
struct Timer
{
// ...
// Declaration of your static members
static LARGE_INTEGER m_freq;
static LONGLONG m_overhead;
};
In a .cpp:
// Definitions
LARGE_INTEGER Timer::m_freq;
LONGLONG Timer::m_overhead;
It is to respect the One Definition Rule.