I am trying to compile my Qt project that compiles fine on a Linux machine, however on my Mac I get the following error:
../../Qt5.0.1/5.0.1/clang_64/include/QtCore/qlist.h:52:10: fatal error:
'initializer_list' file not found
#include <initializer_list>
^
Any idea how to resolve this?
This is a known bug for mac when trying to compile a Qt 5.0+ project with a 64 bit clang compiler. In order to resolve this conflict try the steps outlined in this bug fix forum post:
1) Clone the Desktop Qt 5.0.0 clang 64bit (SDK) kit.
2) Change the compiler from GCC (x86 64bit) to Clang (x86 64bit).
3) Change your project to use the cloned kit.
4) Add the following to your .pro file:
QMAKE_CXXFLAGS = -mmacosx-version-min=10.7 -std=gnu0x -stdlib=libc+
CONFIG +=c++11
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With