Compilation error while trying to compile qt project

I am trying to compile my Qt project which compiles 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 solve this problem?

+6
source share
1 answer

This is a known bug for mac when trying to compile a Qt 5.0+ project with a 64-bit clang compiler. To resolve this conflict, try the steps described in this error on the forum:

1) Clone the Qt 5.0.0 clang desktop kit (SDK).

2) Change the compiler from GCC (x86 64 bit) to Clang (x86 64bit).

3) Change your project to use a cloned set.

4) Add the following file to your .pro file:

 QMAKE_CXXFLAGS = -mmacosx-version-min=10.7 -std=gnu0x -stdlib=libc+ CONFIG +=c++11 
+8
source

All Articles