如何修复此错误(“_ OBJC_CLASS _ $ _ AsyncSocket”,引自:)

时间:2012-09-17 14:34:43

标签: ios asyncsocket

当我将AsyncSocket.h.m添加到我的项目时,我收到了此错误

Undefined symbols for architecture i386:
" _OBJC_CLASS_$_AsyncSocket", referenced from:
  objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

如何解决这个问题?

2 个答案:

答案 0 :(得分:1)

解决问题的2个步骤:

  1. CFNetwork.framework添加到项目

  2. 从Xcode导航器(左侧)选择AsyncSocket.m,从检查员(右侧)选择目标会员部分下的项目名称

  3. 或转到Build Phases> Link Binary with Libraries>点击(+)>添加AsyncSocket.m

答案 1 :(得分:0)

将Security.framework添加到Link Binary with Library:)