DebugUtil.h
#ifndef DEBUG_UTIL_H
#define DEBUG_UTIL_H
#include
int DebugMessage(const char* message)
{
const int MAX_CHARS = 1023;
(Assuming the posted code is a header, included from multiple .cpp files)
Header guards do not protect you from link-time multiple definitions. Regardless that you have ensured the header will only appear once per Translation Unit, if you have more than one Translation Unit then that's still multiple definitions.
Write definitions in source files, and only declarations in headers.
The only exceptions are inline functions, functions defined within a class definition (though this is not recommended!) and function templates.