带有静态库(.a)和动态库(.dylib)的重复符号

时间:2013-08-17 18:16:00

标签: ios paypal

在我的iOS项目中,正在使用库libbaidumapapi.alibPayPalMPL.a

项目可以正确构建,但它在运行时发出异常信号。

在调试问题时,我发现它的原因是因为库libPayPalMPL.a调用了库XMLFreeDoc中的libbaidumapapi.a函数,但它应该在xml2内调用XMLFreeDoc函数动态库。

我没有两个库的源代码。当我查看libbaidumapapi.a时,我发现它已使用minixml.odeflate.o存档,其中XMLFreeDoc和deflate可能与libPayPalMPL.a冲突。

依赖于两个动态库的

libPayPalMPL.a库:xml2zlib

我能解决这个崩溃问题吗?我已在force_load之前使用libbaidumapapi.a

以下是链接命令,以防万一需要。

Ld /Users/tony/Library/Developer/Xcode/DerivedData/travel-aaytjupqtzenxvaepekwcapqqzpv/Build/Products/Debug-iphonesimulator/travel.app/travel normal i386
cd /Users/tony/Documents/temp/mapapp
setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -L/Users/tony/Library/Developer/Xcode/DerivedData/itravel-aaytjupqtzenxvaepekwcapqqzpv/Build/Products/Debug-iphonesimulator -L/Users/tony/Documents/temp/mapapp/libs/Release-iphonesimulator -L/Users/tony/Documents/temp/mapapp/libs/Release-iphoneos -L/Users/tony/Documents/temp/mapapp/libs/Release-iphonesimulator -L/Users/tony/Documents/temp/mapapp/libs -L/Users/tony/Documents/temp/mapapp/libWeiboSDK -L/Users/tony/Documents/temp/mapapp/Library -F/Users/tony/Library/Developer/Xcode/DerivedData/travel-aaytjupqtzenxvaepekwcapqqzpv/Build/Products/Debug-iphonesimulator -filelist /Users/tony/Library/Developer/Xcode/DerivedData/travel-aaytjupqtzenxvaepekwcapqqzpv/Build/Intermediates/travel.build/Debug-iphonesimulator/travel.build/Objects-normal/i386/travel.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -force_load /Users/tony/Documents/temp/mapapp/libs/Release-iphonesimulator/libbaidumapapi.a -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -lz -lxml2 -framework Security -framework SystemConfiguration -framework OpenGLES -framework QuartzCore -lc++ -lopts -framework MapKit -framework CoreLocation -framework UIKit -framework Foundation -framework CoreGraphics -lPayPalMPL -lWeiboSDK -o /Users/tony/Library/Developer/Xcode/DerivedData/travel-aaytjupqtzenxvaepekwcapqqzpv/Build/Products/Debug-iphonesimulator/travel.app/travel*

1 个答案:

答案 0 :(得分:0)

MPL已被弃用。相反,建议您使用iOS SDK:https://github.com/paypal/PayPal-iOS-SDK