12

I needed to pass in "-std=c++0x" for g++ , in Qt Creator. I placed a variable in Build Environment: enter image description here

But i still receive the warning:

warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x

daisy
  • 22,498
  • 29
  • 129
  • 265

1 Answers1

17

You need to add QMAKE_CXXFLAGS += -std=c++0x to your .pro file.

David Feurle
  • 2,687
  • 22
  • 38