clang++-mp-3.4 doesn't find initializer_list on OS X 10.6
Jeremy Huddleston Sequoia
jeremyhu at macports.org
Fri Sep 5 21:05:59 PDT 2014
Yes, if you want C++11 on Snow Leopard, you need to install the libcxx port and use clang-3.3 or later.
Also, I believe you may need to add -stdlib=libc++ in addition to -std=c++11. I think it should be implied, but I forget if it is.
--Jeremy
> On Sep 5, 2014, at 08:23, Lawrence Velázquez <larryv at macports.org> wrote:
>
> On Sep 5, 2014, at 8:23 AM, René J.V. Bertin <rjvbertin at gmail.com> wrote:
>
>> It's all in the title; MacPorts' clang-3.4 doesn't seem to find the initializer_list header on 10.6, whether I specify -std=c++11 or not. It's as if it doesn't search in ${prefix}/libexec/llvm-3.4/include/c++/v1 because if I add that path via -I the compilation succeeds.
>>
>> Of course I then get missing symbols while linking, so maybe it's simply impossible to build what I'm trying to build (kdevelop git/kde4-legacy) on 10.6?
>
> From what I recall, Snow Leopard doesn't have a C++11 runtime. You may have to install the libcxx port manually; clang-3.4 and earlier don't pull it in automatically.
>
> https://trac.macports.org/ticket/34288
>
> Double-check with Jeremy, though.
>
> vq
More information about the macports-users
mailing list