IOS7 (only) stdlibc++ linking issue

To be honest, I don’t like the above answer, as it uses the static lib and not the dynamic!

I have had the problem myself and found that the problem is that xcode is unable to find any C++ files in you project and thus assumes that the libstc++ is not needed!

Quite annoying when you are linking to a static lib that uses it!!

Solution :

  • Add a empty .mm file to you project!
  • Ensure that C++ Standard Library
    is set to libstdc++ (GNU c++ standard library) in the Build Settings

This worked for me and I did not have to add -lstdc++ to Other Linker Flags!

Hope that helps others with the same problem.

Leave a Comment