You need to declare the variable in the header, as you do, to make the name available wherever its needed.
// Helper.h
extern std::ofstream logfile;
You need to define it in the source file; the One Definition Rule requires that you have exactly one definition.
// Helper.cpp
std::ofstream Helper::logfile("log.txt", std::ios_base::out | std::ios_base::app );
With no definition, the variable doesn't exist, hence the "undefined reference" error.
With a definition in the header, it's defined in every translation unit that includes the header, hence the "multiple definition" error.
With a definition in one source file, it's defined once, and the linker is happy.