Compiling software with c++11 support

Jakub Sochor jakub at
Wed Sep 11 08:07:23 PDT 2013

I would like to use c++11 features from libc++ mainly the smart pointers. Not using them is not option for me, because I have to adopt a library where the smart pointers are already used. 

So I have to compile my program with -stdlib=libc++. However if the OpenCV and Boost is not compiled also against the libc++ 
it leads to linking error with std::strings. This is expectable as the string implementation should be different.

So I would like to compile these packages with libc++ support. And probably it will be required to build with this support also their dependences. 

Jakub Sochor

11. 9. 2013 v 16:56, Lawrence Velázquez <larryv at>:

> On Sep 11, 2013, at 5:57 AM, Jakub Sochor <jakub at> wrote:
>> i have a question about the c++11 support. 
>> Is in MacPorts some configuration that will force use all c++ sources to be compiled by host clang with flags '-std=c++11 -stdlib=libc++'.
>> I tried configure.cxxflags but that had no effect in OpenCV for example. 
>> Can you please give me some pointers what should I do, or if it is even possible. 
> These is no supported way to do this, although there are hacky workarounds.
> What exactly do you wish to accomplish?
> vq

More information about the macports-users mailing list