1

There are a lot of question about duplicate symbols for architecure XXX, but I didn't got answer of my question. In my scenario,I use Cocoapod,and import FMDB,But when I integrate another third party SDK,And when I build the project,and got the error as below: enter image description here

Is there any solution can fix my linker error? PS: I'm not familiar with cocoapod,and here is my pod file

platform :ios, "7.0"

# ignore all warnings from all pods
inhibit_all_warnings!

target "Catalyst", :exclusive => true do
pod 'FMDB'
pod 'MBProgressHUD'
# ...ignore other pod lib.
end
Miknash
  • 7,888
  • 3
  • 34
  • 46
HamasN
  • 524
  • 1
  • 5
  • 20
  • What is the other third party SDK you are integrating? The most likely scenario is that it is dependent on FMBD and therefore you're importing it twice. –  Apr 28 '15 at 13:05
  • the third party SDK is a framework, that I don't have source code and FMDB don't have a .h file as well. It was used inside of SDK. And you can see the pic that the SDK is MaaS360SDK.framework. – HamasN Apr 28 '15 at 13:08
  • Does MaaS360SDK utilise FMDB then? It appears to based on your screenshot. –  Apr 28 '15 at 13:11
  • yup, from the linker error, I think MaaS SDK had used FMDB. And my code also use FMDB. – HamasN Apr 28 '15 at 13:17

1 Answers1

1

Based on the screenshot it looks like MaaS360SDK depends on FMDB and therefore includes it in it's package. By importing it through Cocoapods you are importing a second copy, hence the duplicate symbols. Remove the pod and you should be able to access FMDb through the MaaS360SDK.

  • yes, you're right. I had tried to remove FMDB from pod, but MaaS360SDK didn't leave .h file (like this:#import "FMDatabase.h" )to use FMDB. – HamasN Apr 28 '15 at 13:19
  • If you import MassS360SDK you should probably be able to access FMDB still. –  Apr 28 '15 at 13:41
  • 1
    yes,you're right, I find the similar header file and also can access FMDB, Thank you – HamasN May 06 '15 at 01:38