<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Building Qt fails for OS X and C++11]]></title><description><![CDATA[<p dir="auto">I'm trying to build Qt from source and am invoking configure as follows:</p>
<p dir="auto">./configure -opensource -optimized-qmake -c++11</p>
<p dir="auto">This results in an error saying that my compiler (clang) doesn't support C++11. Passing the -v (verbose) option to configure shows the following (trimming the other parts):</p>
<p dir="auto">C++11 auto-detection... ()<br />
clang++ -c -pipe -mmacosx-version-min=10.6 -O2 -std=c++11 -Wall -W -fPIE  -I../../../mkspecs/macx-clang -I. -o c++11.o c++11.cpp<br />
c++11.cpp:50:4: error: "C++11 with clang requires libc++ runtime"</p>
<h1>error "C++11 with clang requires libc++ runtime"</h1>
<p dir="auto">^<br />
1 error generated.<br />
make: *** [c++11.o] Error 1<br />
C++11 disabled.<br />
C++11 support cannot be enabled due to functionality tests!</p>
<p dir="auto">clang does indeed support C++11, but there are two problems with this functionality test. First, -stdlib=libc++ must be explicitly stated to link to the right runtime. Second, -mmacosx-version-min should be 10.7, because that's the minimum target version for applications using C++11 (at least as far as the OS X SDK is concerned). As far as I can tell, I can't pass these options through configure, which to me suggests that the test is wrong.</p>
<p dir="auto">Is there a problem in the configure/feature detection? Or is there a problem in the way in which I'm invoking configure?</p>
<p dir="auto">If you need it, my setup is:</p>
<p dir="auto">clang --version<br />
Apple LLVM version 4.2 (clang-425.0.27) (based on LLVM 3.2svn)<br />
Target: x86_64-apple-darwin12.3.0<br />
Thread model: posix</p>
<p dir="auto">OS X 10.8.3</p>
<p dir="auto">Xcode 4.6.1</p>
]]></description><link>https://forum.qt.io/topic/25938/building-qt-fails-for-os-x-and-c-11</link><generator>RSS for Node</generator><lastBuildDate>Tue, 15 Sep 2026 18:21:16 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/25938.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 06 Apr 2013 16:48:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Building Qt fails for OS X and C++11 on Sat, 06 Apr 2013 21:50:15 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">For the macosx-version-min you can edit the macx-clang mkspec in your sources</p>
<p dir="auto">Hope it helps</p>
]]></description><link>https://forum.qt.io/post/172802</link><guid isPermaLink="true">https://forum.qt.io/post/172802</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sat, 06 Apr 2013 21:50:15 GMT</pubDate></item></channel></rss>