[Interest] My First approach with QT 5.1 on MacOS : very disappointing

Thiago Macieira thiago.macieira at intel.com
Sat Aug 31 02:52:51 CEST 2013


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130830/dee82bcb/attachment.sig>


More information about the Interest mailing list