The recent project team is doing some third-party functionality integration, more than once encountered a third-party library conflict, need to manually remove the conflicting parts.
General third-party. A supports different platforms and requires the removal of conflicting xxx.o from each platform to resolve the introduction of conflicts.
Write a simple script that can delete the conflict xxx.o and regenerate it. A
Parameter ${1} is a name for the third-party feature that conflicts with the project. A
Parameter ${2} is a conflicting. o File name
#!/bin/SHDevice_archs=("armv7" "armv7s" "arm64" "i386" "x86_64") Extra_count=${#DEVICE_ARCHS [@]} for((i=0; i<extra_count;i++)); Domkdir-P ${device_archs[i]} Done for((j=0; j<extra_count;j++)); Do Echo${device_archs[j]} Lipo ${1}.a-thin ${device_archs[j]}-output ${device_archs[j]}/${1}_${device_archs[j]}.a CD ${device_archs[j]}&&arXV ${1}_${device_archs[j]}.aRM-RF ${device_archs[j]}/${1}_${device_archs[j]}.aRM${2}.O CD. &&arRCS ${device_archs[j]}/${1}_${DEVICE_ARCHS[J]}.A ${device_archs[j]}/*. o rm-rf ${device_archs[j]}/*.odonerm ${1}.astring= "for ((j=0;j<extra_count;j++));d Ostring+=${device_archs [j]} /${1}_${device_archs[j]}.a ' Donelipo-create ${string}-output ${1}.afor ((i=0;i<extra_count;i++));d ORM-RF ${ Device_archs[i]}done
Examples:
sh ./xxx. sh libX xxx
XXX.O in LIBX.A will be removed after execution is completed
iOS introduces third-party conflict resolution