[Development] Using Qt 5 with C++11/Clang 3.1?
olivier at woboq.com
Fri Jul 6 18:12:10 CEST 2012
On Friday 06 July 2012 11:17:15 Stephen Chu wrote:
> Has anyone successfully build Qt 5 to use with Clang 3.1 on any
> platform? I see the new macx-clang-libc++ mkspecs are now included.
> Using it enables automatic detection of C++11 features in configure. But
> that causes errors on C++11 features when building like:
> I can get it sort of built by configuring with -no-c++11 option. It
> still fails to build some of the libraries but it's enough for my simple
> project. But the same errors (and constexpr ones I reported before) show
> up whenever -std=c++11 and moc is involved.
> GCC 4.7 seems to be able to compile those fine but I read that it's
> actually bugs in the compiler. And we are stuck with 4.2 on OS X anyways.
I's say, please work around it.
Commenting out the code within the
#if defined(Q_COMPILER_CONSTEXPR) && defined(Q_COMPILER_DEFAULT_MEMBERS) &&
fixes the problem for me.
So it should be disabled for those broken version of clang.
Woboq - Qt services and support - http://woboq.com
More information about the Development