“undefined reference to” using ‘g++’ to compile a C++ program

Use

g++ main.cpp Help.cpp

You have to tell the compiler all the files that you want it to compile, not just the first one.

Leave a Comment