整理了下ios下编译环境常出错的地方

http://stackoverflow.com/questions/15070556/apple-mach-o-linker-id-error-opencv-xcode


"std::__1::ios_base::clear(unsigned int)", referenced from:


Building on Cthutu's answer, to add libc++.dylib to your project:

  1. Select your project (the blue file) in your project navigator (Command 1 if it's hidden)
  2. Select your target
  3. Go to Build Phases
  4. Expand "Link Binary With Libraries"
  5. Click the "+"
  6. Type libc++.dylib in the search bar.
  7. Select the libc++.dylib file and press "Add"

http://blog.csdn.net/hamasn/article/details/8551895


看着就非常复杂!
有这么多的link STL的错误。
其实,就是你编译静态库的时候使用不同版本的标准库,  C++ Standard Library

那么如何fix掉这个issue呢?看下面这两张图!


如果你这两个在编译静态库和在使用静态库的app中设置的是一样的,应该就可以解决掉这个问题!

事实上,compiler default 足够了。

期待讨论,反馈问题!


你可能感兴趣的:(整理了下ios下编译环境常出错的地方)