I've added a 3rd party library (Tesseract) to a project. The library builds and runs with no errors when used in an XCode project. My RubyMotion project builds, but fails when linking:
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
I've tried adding Tesseract two different ways, as a :static
library and as an :xcode
project. Same error both ways.
Given that I'm able to build and run a normal Xcode project which uses this library, I'm pretty sure I'm doing something wrong with RubyMotion.
I solved this issue by building Tesseract with the --disable-graphics
option for configure, as mentioned in their FAQ.