two static libraries with duplicate symbols in Xcode

你离开我真会死。 提交于 2019-12-05 20:57:53

Part 1 -- Figuring out whether or not the symbols represent same object.

Note: This is OS X specific.

Okay let's look at how to can look at their disassembly.

You may be able to use the otool to do this:

otool -v -t '/Users/Hoya/Desktop/SocialSync/Cauly/libCaulyDevice.a(TBXML.o)' 

and

otool -v -t '/Users/Hoya/Desktop/SocialSync/include/SMUFLib/deviceLib/libSFCommonLibs.a(TBXML.o)'

Examine the disassembly to see if they are the same, if so then you are in luck :-)

If the foo.a(bar.o) format of the above commands doesn't work (for whatever reason although it should) you can try it by removing the (TBXML.o) from both but then you'd have to do a bit more work.

If they ARE the same then you can easily use the otool + lipo to rebuild ONE of the two .a files so that TBXML.o is not in it

In case they aren't the same then a lot more trickery has to be done :) may not even be possible easily.

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