Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

no type named 'shared_ptr' in namespace 'std'

Hopefully this helps somebody else

Trying to compile an iOS project with Cedar BDD kept failing with no type named 'shared_ptr' in namespace 'std' error message. It was obviously a C++ error but couldn't understand why the C++ library Xcode was using didn;t have the shared_ptr type defined until I discovered the build settings of the target provides two libraries to choose from

  • libstdc++ (compiler default)
  • libc++
like image 954
bnduati Avatar asked Dec 21 '22 15:12

bnduati


1 Answers

selecting libc++ fixes the problem see screenshotXcode 4.4 build settings window

like image 62
bnduati Avatar answered Jan 11 '23 20:01

bnduati