The -std=... flag is not set at last G++ command.
When you set that flag in compiler's options, it is always fine, but if you only set it in project's option, it does not compile (when you have code depending on that flag, of course, like C++11 specifics)