Le 31.08.2013 02:52, Thiago Macieira a écrit : > 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? No it was not already there.
> Can you post the .pro file that creates the original error message > above? ftp://ftp.ics.com/pub/pickup/qmlc++.zip _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest