iOS6: duplicate symbol error in xcode 4.5

橙三吉。 提交于 2019-12-04 06:06:06

问题


I am having a problem running my application.

I am receiving a build failed due to duplicate symbol.

I am including a magtek idynamo sdk to my application. On my previous app version usually I am adding the libMTSCRA.a to the libraries and the MTSCRA.h to my project. Based on my research people suggested that the problem occurs because I am referencing the .h and also the .a which I've managed to work on ios5 version of my app. Its frustrating.. I've been banging my head against the wall on this one.

Any ideas?

UPDATE

Here is the screenshot of my framework and libraries. libMTSCRA.a is only listed once.

Thank you.


回答1:


I had this problem too, and after many time, I can solve it by removing the other linker flag => "-all_load"

Due to this flag, the 2 libraries (iphoneos and iphonesimulator) of MagTek were included at the same time.




回答2:


This error doesn't have anything to do with the header files. Instead, it indicates that the listed function bodies (usually in the .m, but a part of the static library if you're built them into a static library) are being included twice.

Most likely, you're including the static library twice. It may be that one of those inclusions is indirect; you're including another static library that's also including the static library.



来源:https://stackoverflow.com/questions/12738435/ios6-duplicate-symbol-error-in-xcode-4-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!