On sexta-feira, 30 de agosto de 2013 16:03:49, Vincent R. wrote: > I found this one : > http://www.ics.com/blog/integrating-c-qml?page=1 > > I have downloaded the source code, started Creator and clicked on the > Debug button but of course it doesn't > work and I get the following errors : > > /Users/j.doe/Developer/Qt5.1.0/5.1.0/clang_64/include/QtCore/qlist.h:52: > erreur : 'initializer_list' file not found > #include <initializer_list> > ^
The error above is caused by using clang with C++11 and without libc++. C++11 is not enabled by default. > So I have edited the file qmlc++.pro to add -stdlib=libc+ and CONFIG > +=c++11 (as shown below) > > qmlc++.pro: > ---------- > lessThan(QT_MAJOR_VERSION, 5): error(This project requires Qt 5 or > later) > > # Needed by g++ for C++11 support. Adjust as needed for other > compilers. > QMAKE_CXXFLAGS += -std=c++0x -stdlib=libc+ > CONFIG +=c++11 Why is the -std=c++0x flag there? And was it there before you started following questionable advice from Stack Overflow? Can you post the .pro file that creates the original error message above? -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest