Duplicate symbol

时间:2015-11-12 11:25:13

标签: ios frameworks static-libraries bitcode

I have a static library which uses a third-party framework. I also have an SDK in which both the static library and the third-party framework are imported. Everything worked just nice and smoothly until today.

Today I received a new version of this framework that adds bitcode support. I was able replace the framework inside the static library and build it, but when I import the static library and the updated framework into my own SDK, I'm receiving an error about a duplicated symbol being found inside various object files (all related to the framework). In my opinion, this is happening because a header file of my static library asks for headers of the framework and receives it twice (one time from the compiled .a file of the static lib and the other from the framework itself). For some reason, enabling bitcode doesn't seem to manage these references correctly anymore.

This is the actual console transcript extract:

duplicate symbol _IPDJobStatus in:
/Users/akiki/Desktop/IPD_Bitcode/mLite2.4.3/iPD.framework/iPD(IPDDevice.o)
/Users/akiki/Desktop/IPD_Bitcode/mLite2.4.3/iPD.framework/iPD(IPDAdministration.o)
ld: 5 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

How can I solve this issue? I am ready to give you any details you need to help me solve this problem, it has been driving me crazy since days.

My Linking options:

LINKING OPTIONS

I tried to run the command nm -B iPD.* | grep IPDJobStatus and I received the following output:

0000000000007dc0 S IPDJobStatus
0000000000010948 S IPDJobStatus
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: no name list
0000000000007ed8 S IPDJobStatus
0000000000001430 S IPDJobStatus
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: no name list
0000000000001c98 S IPDJobStatus
00000000000043f8 S IPDJobStatus

0 个答案:

没有答案