ccgus / fmdb

A Cocoa / Objective-C wrapper around SQLite
Other
13.84k stars 2.76k forks source link

duplicate symbols error when compile #305

Open mafai opened 9 years ago

mafai commented 9 years ago

Here's my pod file config, I have tried 2.3 and 2.4 version, but none of them works.

platform :ios, '7.0' pod 'ECSlidingViewController', '~> 2.0.1' pod 'AFNetworking', '~> 2.2.1'

pod 'FMDB', '~> 2.3'

pod 'FMDB', '~> 2.4'

Here's the detail output when do the compile. No idea how to solve it, anyone can help ?

duplicate symbol _OBJCIVAR$_FMTextOffsets._rawOffsets in: /Users/xxx/Library/Developer/Xcode/DerivedData/FMTest-ajazzfkkmfqfambtfjloruvkxqtn/Build/Products/Debug-iphonesimulator/libPods.a(FMDatabase+FTS3-769896286EB123AD.o) duplicate symbol _kFTSCommandOptimize in: /Users/xxx/Library/Developer/Xcode/DerivedData/FMTest-ajazzfkkmfqfambtfjloruvkxqtn/Build/Products/Debug-iphonesimulator/libPods.a(FMDatabase+FTS3-769896286EB123AD.o) duplicate symbol _kFTSCommandRebuild in: /Users/xxx/Library/Developer/Xcode/DerivedData/FMTest-ajazzfkkmfqfambtfjloruvkxqtn/Build/Products/Debug-iphonesimulator/libPods.a(FMDatabase+FTS3-769896286EB123AD.o) duplicate symbol _kFTSCommandIntegrityCheck in: /Users/xxx/Library/Developer/Xcode/DerivedData/FMTest-ajazzfkkmfqfambtfjloruvkxqtn/Build/Products/Debug-iphonesimulator/libPods.a(FMDatabase+FTS3-769896286EB123AD.o) duplicate symbol _kFTSCommandMerge in: /Users/xxx/Library/Developer/Xcode/DerivedData/FMTest-ajazzfkkmfqfambtfjloruvkxqtn/Build/Products/Debug-iphonesimulator/libPods.a(FMDatabase+FTS3-769896286EB123AD.o) duplicate symbol _kFTSCommandAutoMerge in: /Users/xxx/Library/Developer/Xcode/DerivedData/FMTest-ajazzfkkmfqfambtfjloruvkxqtn/Build/Products/Debug-iphonesimulator/libPods.a(FMDatabase+FTS3-769896286EB123AD.o) duplicate symbol _OBJCCLASS$_FMTextOffsets in: /Users/xxx/Library/Developer/Xcode/DerivedData/FMTest-ajazzfkkmfqfambtfjloruvkxqtn/Build/Products/Debug-iphonesimulator/libPods.a(FMDatabase+FTS3-769896286EB123AD.o) duplicate symbol _OBJCMETACLASS$_FMTextOffsets in: /Users/xxx/Library/Developer/Xcode/DerivedData/FMTest-ajazzfkkmfqfambtfjloruvkxqtn/Build/Products/Debug-iphonesimulator/libPods.a(FMDatabase+FTS3-769896286EB123AD.o) ld: 8 duplicate symbols for architecture x86_64

stephanheilner commented 9 years ago

Try doing a rm -rf Pods; pod install, then a Clean -> Build in your project.

Also, with CocoaPods, you don't need to manually link the libraries to your projects, let CococaPods manage your dependencies for you.

Oh, and you might want to try to cleanup your DerivedData folder: rm -rf ~/Library/Developer/Xcode/DerivedData

mafai commented 9 years ago

I try both as you suggested. But still get the same error. I just start a new complete new Project, and did not link any library manually.

➜  ~  rm -rf ~/Library/Developer/Xcode/DerivedData 

➜  FMTest  rm -rf Pods; pod install
Analyzing dependencies

CocoaPods 0.34.1 is available.
To update use: [sudo] gem install cocoapods

Downloading dependencies
Installing AFNetworking (2.2.4)
Installing ECSlidingViewController (2.0.3)
Installing FMDB (2.4)
Installing SQLCipher (3.1.0)
Installing sqlite3 (3.8.6)
Generating Pods project
Integrating client project
mafai commented 9 years ago

The problem solved, after the pod version from 0.32.1 to 0.34.1 version.