xamarin.ios - 绑定(bind)到自定义.framework

标签 xamarin.ios

我正在尝试绑定(bind)到 BugSense 的库,但很难尝试在额外的构建参数中使用 -gcc_flags 包含框架。 BugSense 提供了一个 .framework,而不是静态的 .a lib。再多的谷歌搜索也无法让我找到如何将框架正确链接到我的项目的解决方案。

到目前为止我有这样的事情:

-v -v -v -gcc_flags "-framework ${ProjectDir}/../References/BugSense-iOS.framework"

我已将 .framework 文件夹复制到我的 References 文件夹中。

构建项目会导致此 mtouch 错误:

Error 1: mtouch failed with the following message:
/var/folders/XV/XVCgAKTfGEmAUQGlxdGm9E+++TU/-Tmp-/tmp36ed5372.tmp/main.m: In function 'main':
/var/folders/XV/XVCgAKTfGEmAUQGlxdGm9E+++TU/-Tmp-/tmp36ed5372.tmp/main.m:1838: warning: implicit declaration of function 'monotouch_enable_debug_tracking'
/var/folders/XV/XVCgAKTfGEmAUQGlxdGm9E+++TU/-Tmp-/tmp36ed5372.tmp/main.m:1921: warning: implicit declaration of function 'mini_get_debug_options'
/var/folders/XV/XVCgAKTfGEmAUQGlxdGm9E+++TU/-Tmp-/tmp36ed5372.tmp/main.m:1925: warning: implicit declaration of function 'mono_debugger_agent_parse_options'
/var/folders/XV/XVCgAKTfGEmAUQGlxdGm9E+++TU/-Tmp-/tmp36ed5372.tmp/main.m:2059: warning: cast from pointer to integer of different size
/var/folders/XV/XVCgAKTfGEmAUQGlxdGm9E+++TU/-Tmp-/tmp36ed5372.tmp/main.m:2059: warning: initialization makes pointer from integer without a cast
ld: framework not found /Users/xxx/Projects/myProj/myProj/../References/BugSense-iOS.framework
collect2: ld returned 1 exit status

最佳答案

我相信它就像库:您指定框架的名称,然后指定搜索位置。

-F <dir>
-framework <name>

所以试试这个:

-gcc_flags "-F ${ProjectDir}/../References -framework BugSense-IOS"

关于xamarin.ios - 绑定(bind)到自定义.framework,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6514128/

相关文章:

c# - 如何确定 MonoTouch 是否可以使用程序集?

ios - AudioConverter#FillComplexBuffer 返回 -50 并且不转换任何内容

c# - NSAttributedString 不适用于 UITextField ios xamarin

ios - 确定以前安装的应用程序

mono - 获取密码字段的 Monotouch.Dialog InputElement

c# - iOS 14.2 更新后打开模式时 KeyWindow NavigationController 为 null

ios - 无法在 iphone 设备上调试我的 xamarin 表单应用程序

azure - Monotouch - Windows Azure 工具包

xcode - 我的 Storyboard自定义类属性不再在 Xamarin 中生成自定义类?

windows-phone-7 - MvvmCross动态文本值转换