I know the title is a bit confusing. But believe me, i am not trying to confuse :).
In very layman terms , g++ is nothing but a special version of gcc.
Ignoring all the complexities, the most trivial work it does is making cpp the default
language, which results in stdcpp library to get linked by default.
So, if you want to play a trick and compile your cpp code with gcc, just link the stdc++ lib by yourself.
$ gcc file1.cpp -lstdc++ -o output
This will do the trick.
Have tested it with basic helloworld, so if your complex template containing code doesn't compile with this, don't complain, more over you should give a thought about what template is actually doing to your code :).