我想弄清楚如何爲靜態庫創建一個工作綁定項目。我們沒有自己創建靜態庫,但我們有權使用它。綁定靜態庫的問題(.a)
我試圖按照此頁面上的步驟沒有成功:https://developer.xamarin.com/guides/ios/advanced_topics/binding_objective-c/walkthrough/
基本上發生的事情是,在運行命令時「記號筆綁定--sdk = iphoneos9.3 * .A」我的列表錯誤(見帖子底部) 因此,在玩了好幾個小時之後,我決定閱讀ApiDefinition。顯然上面鏈接的指南中描述的過程已被棄用,我應該將.a文件作爲本地參考添加。我們不得不手動創建綁定。問題是,我不知道庫中的方法名稱。另外,即使我這樣做,圖書館是巨大的(我們的桌面版本的頭文件已經是36k行)。
有人可以告訴我們如何進行?
從記號筆命令錯誤的列表:
Macbook-Pro:iossdk researchdevelopment$ sharpie bind --sdk=iphoneos9.3 libHCNetSDK_sim.a
Parsing 1 header files...
warning: /Users/researchdevelopment/Desktop/iossdk/libHCNetSDK_sim.a: 'linker' input unused
warning: argument unused during compilation: '-c'
warning: argument unused during compilation: '-fno-spell-checking'
warning: argument unused during compilation: '-Xclang -detailed-preprocessing-record'
warning: argument unused during compilation: '-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk'
warning: argument unused during compilation: '-D NS_BUILD_32_LIKE_64'
warning: argument unused during compilation: '-miphoneos-version-min=9.3'
warning: argument unused during compilation: '-I /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include'
warning: argument unused during compilation: '-I /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1'
error: unable to handle compilation, expected exactly one compiler job in ''
Error while processing /Users/researchdevelopment/Desktop/iossdk/libHCNetSDK_sim.a.
Submitting usage data to Xamarin...
Submitted - thank you for helping to improve Objective Sharpie!
Done. Exiting with error code 1.
error: Clang failed to parse input and exited with code 1
您是否有權訪問本機庫的頭文件/文件?目標Sharpie解析這些頭文件以提取方法簽名以生成ApiDefinition.cs和StructsAndEnums.cs文件 –
我確實有頭文件,但Objective Sharpie似乎無法解析它們。我嘗試修改頭文件和刪除部分,但它生成的所有文件都是StructsAndEnums.cs,並且沒有ApiDefinition.cs。任何線索爲什麼這樣做?可以解決這個問題也解決我的主要問題? – MrSoundless