C++ Undefined reference to a function
Adding #include "Helper.h"
to your main.cpp
makes the declaration of Helper::IsStringNumeric
visible to the compiler, but you still need to compile Helper.cpp
to object code in order to make the definition of Helper::IsStringNumeric
available when you link your main
program.
You can either compile each translation unit to an object code file and then link them:
g++ -g -o main.o -c main.cpp
g++ -g -o Helper.o -c Helper.cpp
g++ main.o Helper.o -o main
or (for simple programs) do it all in one step
g++ -g main.cpp Helper.cpp -o main