Undefined symbols for architecture error when deployment target is 7.0 Undefined symbols for architecture error when deployment target is 7.0 xcode xcode

Undefined symbols for architecture error when deployment target is 7.0


for me, including the 'stdc++.6.0.9.dylib' instead of 'stdc++.dylib' into the dependencies resolved the linker errors too


It turns out that if XCode can't find any C++ files in the project, then it assumes that libstd++ is not required. So, you have to manually add a C++ file to the project (an empty .mm file would be enough). That is the solution.

All the credits go to this answer in this Stackoverflow thread.


It looks as if myLibrary.a was built with calls to C++ code and used libstdc++ as its C++ standard library. Your application project probably specifies libc++ instead, perhaps as the compiler default.

Try switching back to libstdc++ and see if the errors go away (or change, at least). Your eventual solution is likely to be a library that's built against the new standard library.