App crashes on iOS 6: Symbol not found: ___sync_fetch_and_add_4

牧云@^-^@ 提交于 2019-12-06 06:36:52

Make sure you aren't targeting any iOS below 4.3. Same goes for your static library, you will need to rebuild these. Also, make sure to remove armv6 from Archs and add armv7s is it does not exist.

After upgrading to Xcode 4.5, I tried everything for 2 days, and nothing worked. I finally gave up and went back to using Xcode 4.2.1

open -a /Developer/Applications/Xcode.app

Just to clarify. I've run my app on iOS 6 by building using the iOS 5 SDK. so unless you need iOS 6 functionality immediately, that works.

It shouldn't really be necessary to downgrade to an early version of iOS. I think the key is to use the extra bindings that are available for C and objective C development:

http://czmq.zeromq.org/ http://www.zeromq.org/bindings:objc

I used the czmq ones and can confirm these build with xcode in an iOS 6 project. I spent some time trying to get these to work as there's not much documentation on using them with iOS SDKs, but found the easiest method was to:

  • Download zeromq from http://download.zeromq.org/zeromq-3.2.2.tar.gz, extract, configure and build from the command line.
  • Download czmq from the link above and extract.
  • Import the src and include paths from the above into an xcode project.
  • Add -lstdc++ to the 'Other Linker Flags' section under 'Build Settings' for your target project
  • Import "czmq.h"

The libraries should successfully link together, then you should be good to go!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!