iOS中使用RegexKitLite來試用正則表達式 使用ARC 20個錯誤解決辦法 mark

You can also disable the ARC for the RegexKitLite only by adding a flag:

select the project -> YOUR Target -> on the Tab the "Build Phases" and open the "Compile Sources" and add for "RegexKitLite.m" the flag "-fno-objc-arc".


 我還是不理解,不過成功了就行。。。

RegexKitLite下載導入項目之後編譯提示錯誤。錯誤如下


Undefined symbols for architecture i386:
  "_uregex_open", referenced from:
      _rkl_getCachedRegex in RegexKitLite.o
  "_uregex_groupCount", referenced from:
      _rkl_getCachedRegex in RegexKitLite.o
  "_uregex_setText", referenced from:
      _rkl_setCachedRegexToString in RegexKitLite.o
      _rkl_clearCachedRegexSetTo in RegexKitLite.o
      -[RKLBlockEnumerationHelper initWithRegex:options:string:range:error:] in RegexKitLite.o
  "_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_find", referenced from:
      _rkl_search in RegexKitLite.o
  "_uregex_findNext", referenced from:
      _rkl_search in RegexKitLite.o
      _rkl_replaceAll 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_close", referenced from:
      _rkl_clearCachedRegex in RegexKitLite.o
  "_u_errorName", referenced from:
      _rkl_userInfoDictionary in RegexKitLite.o
      _rkl_makeNSError in RegexKitLite.o
      _rkl_NSExceptionForRegex in RegexKitLite.o
  "_u_strlen", referenced from:
      _rkl_userInfoDictionary in RegexKitLite.o
  "_uregex_clone", referenced from:
      -[RKLBlockEnumerationHelper initWithRegex:options:string:range:error:] in RegexKitLite.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
解決辦法:
In project setting search "other" at Other Linker Flags put the word "-licucore".
編譯設置的Other Linker Flags中添加“-licucore”

引用地址:
http://www.iphonedevsdk.com/forum/iphone-sdk-development/8584-regexkitlite-wouldnt-compile.html

發佈了56 篇原創文章 · 獲贊 4 · 訪問量 21萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章