Is it only thing about this error for this case ?
It will fix the command line for g++, but I have no idea what errors you will run into during the rest of the compilation and linking. I don't see any libraries being linked in, for example, so you'll likely get unresolved symbol errors once you get past the compile stage and into the link stage.