# Revision history [back]

Here what I have for compiling alljoyn with libc++. Note that this is not suggested as I have not yet tested if everything works as before the changes. But it will compile and you will be able to link your c++11 software with it.

1. build_core/conf/darwin/x86/SConscript

Change

env.Append(CXXFLAGS=[
'-fno-rtti',
'-fno-exceptions',
'-Wc++11-extensions'])


To

env.Append(CXXFLAGS=[
'-frtti',
'-fexceptions',
'-std=c++11',
'-stdlib=libc++'])

env.Append(LINKFLAGS=[
'-stdlib=libc++'])

1. alljoyn_core/router/RuleTable.cc

Change

rules.erase(range.first);


To

rules.erase(range.first->first);

1. alljoyn_core/src/AboutDataInternal.h

Change

bool operator()(const char& lhs, const char& rhs)


To

bool operator()(const char& lhs, const char& rhs) const


And

bool operator()(const qcc::String& lhs, const qcc::String& rhs)


To

bool operator()(const qcc::String& lhs, const qcc::String& rhs) const

1. common/inc/qcc/STLContainer.h

Change

#if (__cplusplus >= 201100L) && !defined(QCC_OS_DARWIN)


To

#if (__cplusplus >= 201103L)


Here you will have a bug if you switch back to an older version of c++. I don't know why, but the condition on __cplusplus is true even without the -std=c++11 flag.

Project->clean Project->build

You should now be able to link alljoyn with your c++11 software. Note that this temporary solution works with iOS too.