【问题标题】:Linking failure with a MonoTouch native library binding使用 MonoTouch 本机库绑定链接失败
【发布时间】:2013-05-07 00:15:01
【问题描述】:

我正在为 Wikitude SDK 创建本机库绑定。

MonoTouch 应用程序失败链接

架构 armv7 的未定义符号:
“std::__1::basic_string, std::__1::allocator >::find_last_of(char const*, unsigned long, unsigned long) const”,引用自: WtUnzip::unzipFileTo(char const*, bool) in WikiitudeSDK.a(wtunzip.o) ...

我的链接:

[assembly: LinkWith ("WikitudeSDK.a", LinkTarget.ArmV7, Frameworks = "CoreVideo Security SystemConfiguration CoreMedia AVFoundation CFNetwork CoreLocation CoreMotion MediaPlayer OpenGLES QuartzCore CoreGraphics", ForceLoad = true, LinkerFlags = "-lsqlite3.0 -ObjC", IsCxx = true)]

我不得不承认我是这个 MonoTouch/IOS 世界的新手,因为我正在努力摆脱困境。

我应该怎么做才能让我的应用链接?

【问题讨论】:

    标签: binding linker xamarin.ios


    【解决方案1】:

    我只是想我需要在我的 LinkWith 中添加 libc++。我的新 LinkWith 如下所示:

    [assembly: LinkWith ("WikitudeSDK.a", LinkTarget.ArmV7, Frameworks = "CoreVideo Security SystemConfiguration CoreMedia AVFoundation CFNetwork CoreLocation CoreMotion MediaPlayer OpenGLES QuartzCore CoreGraphics", ForceLoad = true, LinkerFlags = "-lsqlite3.0 -ObjC -lc++", IsCxx = true)]
    

    希望这最终可以帮助其他人。

    【讨论】:

    • 我还建议添加 -lz(用于 libz.dylib),如 Wikiitude 文档页面所述。
    【解决方案2】:

    我正在处理链接步骤失败并显示“本地链接失败,未定义符号:std::string::find_last_of(char const*, unsigned long, unsigned long)...”的问题

    事实证明,该应用的 iOS 部署目标显然与原始原生库不匹配。通过匹配这些(通过与同一绑定库的工作“消费者”进行比较),我能够克服错误。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-13
      • 2016-08-02
      • 2023-02-14
      • 2013-09-21
      • 2022-09-27
      • 1970-01-01
      相关资源
      最近更新 更多