Search code examples
iosfmdbrubymotion

Anybody have any luck getting FMDB to work with Rubymotion?


I'm trying to get FMDB to work with Rubymotion but every time I try to build the app I get this error:

FMDBTest(master):rake
     Build ./build/iPhoneSimulator-5.1-Development
     Build vendor/Pods
      Link ./build/iPhoneSimulator-5.1-Development/FMDBTest.app/FMDBTest
ld: duplicate symbol _main in ./build/iPhoneSimulator-5.1-Development/objs/main.o and /Users/Bodacious/Apps/FMDBTest/vendor/Pods/build-iPhoneSimulator/libPods.a(fmdb.o) for architecture i386

Here's the app I'm using to test: https://github.com/Bodacious/FMDBTest

Has anybody else got this to work? :/


Solution

  • I don't know RubyMotion, but have had similar problems as I've included FMDB into projects. Bottom line, exclude fmdb.m from your build. It has it's own main() function, which is useful for testing, but it when included in a project, it gives you an error like this. You need the FMDB classes, but not fmdb.m.