【发布时间】:2012-10-18 06:56:58
【问题描述】:
我已将第 3 方库 (Tesseract) 添加到项目中。该库在 XCode 项目中使用时构建和运行时不会出现错误。我的 RubyMotion 项目构建,但在链接时失败:
duplicate symbol _main in:
vendor/Tesseract/build-iPhoneSimulator/libTesseract.a(svpaint.o)
./build/iPhoneSimulator-5.0-Development/objs/main.o
duplicate symbol _selCopy in:
vendor/Tesseract/build-iPhoneSimulator/libTesseract.a(sel1.o)
/Library/RubyMotion/data/5.0/iPhoneSimulator/libmacruby-static.a(id.o)
duplicate symbol _selWrite in:
vendor/Tesseract/build-iPhoneSimulator/libTesseract.a(sel1.o)
/Library/RubyMotion/data/5.0/iPhoneSimulator/libmacruby-static.a(id.o)
ld: 3 duplicate symbols for architecture i386
我尝试以两种不同的方式添加 Tesseract,作为:static 库和作为:xcode 项目。两种方式都出现同样的错误。
鉴于我能够构建和运行使用此库的普通 Xcode 项目,我很确定我在使用 RubyMotion 时做错了。
【问题讨论】:
-
我遇到了这个确切的问题。你找到解决办法了吗?
-
@Ian - 好消息:是的,我解决了这个问题。刚刚发布了这个问题的答案。坏消息:我遇到了一个新错误。该项目成功构建,但是当我调用 Tesseract(即使使用像
Tesseract.alloc.initWithDataPath这样的简单测试)时,它也会失败,并出现 _tesseract 的未定义符号错误。 RubyMotion 支持没有响应,如果您解决了这个问题,请告诉我!
标签: ios tesseract rubymotion