iOS静态库重复的.o文件 的终极解决办法

时间:2020-12-10 14:49:13
ZlindeMac-mini:~ zlinsun$ cd /LibSDK 
ZlindeMac-mini:LibSDK zlinsun$ ls
libiot.sdk.a
ZlindeMac-mini:LibSDK zlinsun$ lipo -info libiot.sdk.a
Architectures in the fat file: libiot.sdk.a are: armv7 arm64 
ZlindeMac-mini:LibSDK zlinsun$  lipo libiot.sdk.a -thin armv7 -output tbv7.a
ZlindeMac-mini:LibSDK zlinsun$  lipo libiot.sdk.a -thin arm64 -output tb64.a
ZlindeMac-mini:LibSDK zlinsun$ ls
libiot.sdk.a        tb64.a      tbv7.a
ZlindeMac-mini:LibSDK zlinsun$ ar -d tbv7.a AsyncSocket.o
ZlindeMac-mini:LibSDK zlinsun$ ar -d tb64.a AsyncSocket.o
ZlindeMac-mini:LibSDK zlinsun$ lipo -create tbv7.a tbv64.a -output libSun.a