7

In one of my iphone projects I have used the RegexLiteKit for drawing rout in my mapview. While compiling the following failures are showing,

Undefined symbols for architecture i386:
  "_uregex_start", referenced from:
      _rkl_performRegexOp in RegexKitLite.o
      _rkl_search in RegexKitLite.o
      _rkl_findRanges in RegexKitLite.o
  "_uregex_end", referenced from:
      _rkl_performRegexOp in RegexKitLite.o
      _rkl_search in RegexKitLite.o
      _rkl_findRanges in RegexKitLite.o
  "_uregex_setText", referenced from:
      _rkl_clearCacheSlotSetTo in RegexKitLite.o
      _rkl_setCacheSlotToString in RegexKitLite.o
  "_uregex_find", referenced from:
      _rkl_search in RegexKitLite.o
  "_uregex_findNext", referenced from:
      _rkl_search in RegexKitLite.o
      _rkl_replaceAll in RegexKitLite.o
  "_u_errorName", referenced from:
      _rkl_NSExceptionForRegex in RegexKitLite.o
      _rkl_userInfoDictionary in RegexKitLite.o
  "_u_strlen", referenced from:
      _rkl_userInfoDictionary in RegexKitLite.o
  "_uregex_reset", referenced from:
      _rkl_replaceAll in RegexKitLite.o
  "_uregex_appendReplacement", referenced from:
      _rkl_replaceAll in RegexKitLite.o
  "_uregex_appendTail", referenced from:
      _rkl_replaceAll in RegexKitLite.o
  "_uregex_open", referenced from:
      _rkl_getCachedRegex in RegexKitLite.o
  "_uregex_groupCount", referenced from:
      _rkl_getCachedRegex in RegexKitLite.o
  "_uregex_close", referenced from:
      _rkl_clearCacheSlotRegex in RegexKitLite.o

ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is there any way to make RegexLiteKit work? please help..

4

6 回答 6

18
  • 转到您的目标构建设置
  • 搜索linker flags
  • 双击附近other linker flags并添加-licucore

完毕

于 2013-09-15T08:40:35.773 回答
14

将 libicucore 框架添加到您的项目中解决此问题,并通过此链接进行参考http://www.mobisoftinfotech.com/blog/iphone/iphone-regular-expression-tutorial-regexkitlite-framework/

于 2012-09-10T07:33:56.960 回答
10

我通过在我的项目中添加 libicucore 框架解决了这个问题。添加 libicucore 框架的方法Build Settings-> Linking->Other Linker Flags --> -licucore

于 2013-03-09T05:37:19.883 回答
9

您需要在下面设置链接器标志是执行相同操作的步骤。转到构建设置-> 链接-> 其他链接器标志-> -licucore

不要忘记在licucore上方添加-

于 2013-03-21T14:20:53.643 回答
1

如果您没有将 arc 用于项目,请-fno-objc-arcRegexKitLite.m.

接下来,您必须添加其他链接器标志,如下所示:

构建设置 > 链接 >其他链接器标志

添加:

-licucore
-ObjC
-lc++

谢谢,

于 2015-09-12T08:28:33.327 回答
1

对于 iOS 9.2 和 Xcode 7,我解决了如下问题

  1. 点击您的项目
  2. 点击目标
  3. 单击“构建阶段”选项卡
  4. 双击 RegexKitLie.m
  5. 在打开的框中输入 -fno-objc-arc
  6. 完成并享受。
于 2015-12-22T11:35:43.460 回答