iosobjective-cfmdbtouchdb

Duplicate symbol error when using TouchDB and FMDB wrapper together


In my app I'm storing data using TouchDB. I've added TouchDB.framework, everything worked fine. Then I had to work with a sqlite database in the same application, and as I'm accustomed with FMDB wrapper, I added it to the project. On build I received the following error:

duplicate symbol _OBJC_CLASS_$_FMDatabase in:
    /Users/me/Library/Developer/Xcode/DerivedData/.../armv7/FMDatabase.o
    /Users/me/.../TouchDB.framework/TouchDB(FMDatabase.o)

I guess that TouchDB framework contains FMDatabase file as well, but it's missing from Headers folder. How to fix this issue?


Solution

  • Don't link against FMDatabase, just link against TouchDB. Since I'm not sure how you're setting up those links, that's as precise as I can be.