2013-08-17 76 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/ –

相關問題