Need to link with g++, not gcc