Undefined reference to a static member
You need to define _frequency in the .cpp file. i.e. LARGE_INTEGER WindowsTimer::_frequency;
You need to define _frequency in the .cpp file. i.e. LARGE_INTEGER WindowsTimer::_frequency;
Caveat: It is not necessary to put the implementation in the header file, see the alternative solution at the end of this answer. Anyway, the reason your code is failing is that, when instantiating a template, the compiler creates a new class with the given template argument. For example: template<typename T> struct Foo { T … Read more