TouchJSON 的 Monotouch 绑定? [英] Monotouch binding for TouchJSON?

查看:16
本文介绍了TouchJSON 的 Monotouch 绑定?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用于 iPhone 的 admob sdk 使用专有的 libAdMobNoThumb.a 库和基于 Objective-C 源的 TouchJSON 库.

The admob sdk for iPhone uses a proprietary libAdMobNoThumb.a library and an Objective-C source based TouchJSON library.

有人知道 TouchJSON 的 C# 绑定以便我们可以包含它吗?

Does anybody know of a C# binding for TouchJSON so that we can include it?

或者有人知道如何构建一个可以被包含的库吗?

Or does anybody know how to build a library that can be included?

我们使用 Xcode 创建了一个 iPhone 库项目并添加了完整的 TouchJSON 源代码树.我们已经将结果 libTouchJSON.a 与以下 gcc_flags 链接到一个测试 iPhone 应用程序中:

We created an iPhone Library project with Xcode and added the full TouchJSON source tree. We've than linked the resulting libTouchJSON.a in a test iPhone app with following gcc_flags:

-v -v -v -gcc_flags "-L${ProjectDir}/Lib -lAdMobNoThumb -lTouchJSON -force_load ${ProjectDir}/Lib/libAdMobNoThumb.a -force_load ${ProjectDir}/Lib/libTouchJSON.a"

这产生了以下错误输出(感谢 -v -v -v):

This produced following error output (thanks to the -v -v -v):

Error 1: mtouch failed with the following message:
/var/folders/hF/hF42FIdhEUmY1y-pGRsu1k+++TI/-Tmp-/tmpe374af5.tmp/main.m: In function 'monotouch_debug_connect':
/var/folders/hF/hF42FIdhEUmY1y-pGRsu1k+++TI/-Tmp-/tmpe374af5.tmp/main.m:1779: warning: implicit declaration of function 'select'
/var/folders/hF/hF42FIdhEUmY1y-pGRsu1k+++TI/-Tmp-/tmpe374af5.tmp/main.m: In function 'main':
/var/folders/hF/hF42FIdhEUmY1y-pGRsu1k+++TI/-Tmp-/tmpe374af5.tmp/main.m:1821: warning: implicit declaration of function 'chdir'
/var/folders/hF/hF42FIdhEUmY1y-pGRsu1k+++TI/-Tmp-/tmpe374af5.tmp/main.m:1838: warning: implicit declaration of function 'monotouch_enable_debug_tracking'
/var/folders/hF/hF42FIdhEUmY1y-pGRsu1k+++TI/-Tmp-/tmpe374af5.tmp/main.m:1914: warning: implicit declaration of function 'dup2'
/var/folders/hF/hF42FIdhEUmY1y-pGRsu1k+++TI/-Tmp-/tmpe374af5.tmp/main.m:1921: warning: implicit declaration of function 'mini_get_debug_options'
/var/folders/hF/hF42FIdhEUmY1y-pGRsu1k+++TI/-Tmp-/tmpe374af5.tmp/main.m:1925: warning: implicit declaration of function 'mono_debugger_agent_parse_options'
/var/folders/hF/hF42FIdhEUmY1y-pGRsu1k+++TI/-Tmp-/tmpe374af5.tmp/main.m:2052: warning: implicit declaration of function 'getpagesize'
/var/folders/hF/hF42FIdhEUmY1y-pGRsu1k+++TI/-Tmp-/tmpe374af5.tmp/main.m:2055: warning: cast from pointer to integer of different size
/var/folders/hF/hF42FIdhEUmY1y-pGRsu1k+++TI/-Tmp-/tmpe374af5.tmp/main.m:2055: warning: initialization makes pointer from integer without a cast
Undefined symbols:
  "_OBJC_CLASS_$_CJSONSerializer", referenced from:
      objc-class-ref-to-CJSONSerializer in libAdMobNoThumb.a(AdMobAd.o)
      objc-class-ref-to-CJSONSerializer in libAdMobNoThumb.a(AdMobWebView.o)
      objc-class-ref-to-CJSONSerializer in libAdMobNoThumb.a(AdMobFlexWebView.o)
  "_OBJC_CLASS_$_CJSONDeserializer", referenced from:
      objc-class-ref-to-CJSONDeserializer in libAdMobNoThumb.a(AdMobOpener.o)
      objc-class-ref-to-CJSONDeserializer in libAdMobNoThumb.a(AdMobSearchViewController.o)
      objc-class-ref-to-CJSONDeserializer in libAdMobNoThumb.a(AdMobAd.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
 (1) (AdMobber)

有什么建议可以解决这个问题吗?

Any suggestions to get around this problem?

TIA,莫莉克.

推荐答案

您的 AdMob 库找不到 CJSONDeserializer 或 CJSONSerializer 类,我推测它们来自 libTouchJSON.a.通常这意味着您的 libTouchJSON.a 未包含在您的项目中.您应该仔细检查所有额外的参数,并确保您的 libTouchJSON 不是拇指并包含您尝试链接的所有架构(模拟器为 x86,设备为 armv6)

Your AdMob library cannot find the CJSONDeserializer or CJSONSerializer classes, which I presume come from libTouchJSON.a. Generally this means that your libTouchJSON.a wasn't included in your project. You should double check all your extra arguments, and ensure that your libTouchJSON is not thumb and includes all the architectures you're trying to link (x86 for simulator, armv6 for device)

这篇关于TouchJSON 的 Monotouch 绑定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆