Code goes in .cpp files, not .h files. This library cannot be used across multiple translation units. It needs refactoring into a .h and .cpp pair rather than a monolithic .h file.
The .h file should contain the class definition and an extern to a global instance (if one is really needed). The .cpp file should contain the implementation and, if one is needed, a global instance.
Code goes in .cpp files, not .h files. This library cannot be used across multiple translation units. It needs refactoring into a .h and .cpp pair rather than a monolithic .h file.
The .h file should contain the class definition and an
extern
to a global instance (if one is really needed). The .cpp file should contain the implementation and, if one is needed, a global instance.