2013-08-17 78 views
0

在我的iOS项目中,正在使用库libbaidumapapi.alibPayPalMPL.a带有静态库(.a)和动态库(.dylib)的重复符号

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

在调试的问题,我发现它的原因是因为库libPayPalMPL.a调用库内libbaidumapapi.aXMLFreeDoc功能,但应该调用里面xml2动态库的xmlFreeDoc释放功能。

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

libPayPalMPL.a依赖于两个动态库的库:xml2zlib

我可以修复这个崩溃问题吗?我已在libbaidumapapi.a之前使用force_load

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

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* 

回答

0

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

+0

似乎PayPal-iOS-SDK仅适用于美国境内。我正在为中国客户开发一款应用程序。我看到PayPal-iOS-SDK也依赖于libxml2.dylib。我相信结果是一样的。 https://developer.paypal.com/webapps/developer/docs/faq/ –

相关问题