在我的一个iphone项目中,我使用RegexLiteKit在mapview中绘制路径。正在编译以下故障时,
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)
有没有办法让RegexLiteKit工作?请帮忙..
答案 0 :(得分:18)
linker flags
other linker flags
附近双击并添加-licucore
完成
答案 1 :(得分:14)
将libicucore框架添加到您的项目中解决此问题并参考此链接http://www.mobisoftinfotech.com/blog/iphone/iphone-regular-expression-tutorial-regexkitlite-framework/
答案 2 :(得分:10)
我通过在我的项目中添加libicucore框架来解决这个问题。添加libicucore框架工作的方法构建设置 - >链接 - >其他链接器标志 - > -licucore 强>
答案 3 :(得分:9)
您需要在下面设置链接器标志才能执行相同操作。 转到构建设置 - >链接 - >其他链接器标志 - >的 -licucore 强>
不要忘记在 licucore 上面添加 -
答案 4 :(得分:1)
如果您没有将arc用于项目,请为-fno-objc-arc
添加编译器标记RegexKitLite.m
。
接下来,您必须通过以下方式添加其他链接器标志:
构建设置>链接> 其他链接标记
添加:
-licucore
-ObjC
-lc++
谢谢,
答案 5 :(得分:1)
对于iOS 9.2和Xcode 7,我解决了以下问题