Makefile with C++

Some C examples you simply use the makefile to build your pdx, I was wondering if the same can be done for C++? I’ve tried just putting the example cpp file from “Hello World CPP” into the SRC where you usually place C files in the makefile, but problems arise when trying to build. What other steps do I need to do get that running or to tell the file that ‘hey I need the g++ compiler’ when its running all of its rules?