How to reliably find the C++11 <array> header?

Thibaut Paumard thibaut at macports.org
Sat Nov 1 02:39:04 PDT 2014


Le 31/10/2014 18:04, Lawrence Velázquez a écrit :
> On Oct 31, 2014, at 5:45 AM, Thibaut Paumard <thibaut at macports.org> wrote:
> 
>> The error message is:
>> /bin/sh ../libtool  --tag=CXX   --mode=compile /usr/bin/clang++
>> -DHAVE_CONFIG_H -I. -I.. -I../include  -I../include
>> -I/opt/local/include/udunits2/  -I/opt/local/include
>> -DGYOTO_NO_DEPRECATED -D_THREAD_SAFE -pthread
>> -DGYOTO_PREFIX=\"/opt/local\" -pipe -Os -arch x86_64 -stdlib=libstdc++
>> -std=gnu++11 -MT Photon.lo -MD -MP -MF .deps/Photon.Tpo -c -o Photon.lo
>> Photon.C
>> In file included from Worldline.C:20:
>> ../include/GyotoWorldline.h:36:11: fatal error: 'array' file not found
>> # include <array>
>>
>> I don't understand this as the <array> header is part of the C++11
>> standard and the above command lines includes -std=gnu++11.
> 
> The command also specifies "-stdlib=libstdc++". Apple's libstdc++ does not support C++11.

Thanks to all.

Then I will shortly start by disabling C++11 based of the value of
configure.cxx_std_lib. Ideally though I would like setting it instead,
but how can I test the package on a version of OS X which I don't own?
Are there porter boxes remotely accessible somewhere?

Kind regards, Thibaut.



More information about the macports-dev mailing list