Duplicate symbol error when using TouchDB and FMDB wrapper together

271 Views Asked by At

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?

1

There are 1 best solutions below

3
David Berry On BEST ANSWER

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.