XNATouch 和 btouch 生成的 admob 绑定的 Mtouch 生成问题

发布于 2024-10-04 22:32:13 字数 3755 浏览 0 评论 0原文

XNATouch 和 btouch 生成的 admob 绑定的 Mtouch 生成问题。

我们正在尝试在 iPhone 上为 AdMob 库使用 btouch 生成的 C# 绑定。我们有一个由 MonoDevelop/Monotouch 制作的测试应用程序。将 libAdMobNoThumb.a 和 libTouchJSON.a 复制到项目目录中后,我们将其与以下额外标志链接:

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

这按预期工作,AdMob 横幅广告功能可以运行。

下一步,我们希望在 XNATouch 程序中尝试这一点。我们使用 XNATouch_1_0 下载包中提供的 BouncingBox 演示。它编译没有错误并且运行良好。但是,如果我们添加上述额外标志(在复制演示项目目录中的库之后),编译将失败并显示以下错误消息:(

Error 1: mtouch failed with the following message:
main.m:9:26: error: mono/jit/jit.h: No such file or directory
main.m:10:36: error: mono/metadata/assembly.h: No such file or directory
main.m:11:39: error: mono/metadata/mono-config.h: No such file or directory
main.m:12:38: error: mono/metadata/mono-debug.h: No such file or directory
main.m:13:26: error: monotouch/gc.h: No such file or directory
main.m:14:33: error: monotouch/monotouch.h: No such file or directory
main.m: In function 'main':
main.m:1811: error: 'MonoAssembly' undeclared (first use in this function)
main.m:1811: error: (Each undeclared identifier is reported only once
main.m:1811: error: for each function it appears in.)
main.m:1811: error: 'assembly' undeclared (first use in this function)
main.m:1813: error: 'MTSupport' undeclared (first use in this function)
main.m:1813: error: 'gcd' undeclared (first use in this function)
main.m:1838: warning: implicit declaration of function 'monotouch_enable_debug_tracking'
main.m:1899: error: 'MonoDebugOptions' undeclared (first use in this function)
main.m:1899: error: 'options' undeclared (first use in this function)
main.m:1921: error: expected expression before ')' token
main.m:1925: warning: implicit declaration of function 'mono_debugger_agent_parse_options'
main.m:1926: warning: implicit declaration of function 'mono_debug_init'
main.m:1926: error: 'MONO_DEBUG_FORMAT_MONO' undeclared (first use in this function)
main.m:1957: warning: implicit declaration of function 'mono_register_config_for_assembly'
main.m:1963: warning: implicit declaration of function 'mono_register_machine_config'
main.m:1969: warning: implicit declaration of function 'mono_jit_init_version'
main.m:1976: warning: implicit declaration of function 'monotouch_init'
main.m:1990: error: 'gchar' undeclared (first use in this function)
main.m:1990: error: 'tokens' undeclared (first use in this function)
main.m:1990: warning: implicit declaration of function 'g_strsplit'
main.m:1991: error: 'aname' undeclared (first use in this function)
main.m:1992: error: 'basename' undeclared (first use in this function)
main.m:2001: warning: implicit declaration of function 'g_strdup_printf'
main.m:2003: warning: implicit declaration of function 'g_strfreev'
main.m:2005: warning: implicit declaration of function 'monotouch_register'
main.m:2005: warning: implicit declaration of function 'mono_assembly_open'
main.m:2009: warning: implicit declaration of function 'g_free'
main.m:2019: warning: implicit declaration of function 'monotouch_get_has_classmap'
main.m:2020: warning: implicit declaration of function 'monotouch_map'
main.m:2056: error: 'guint64' undeclared (first use in this function)
main.m:2075: warning: implicit declaration of function 'mono_jit_exec'
main.m:2075: warning: implicit declaration of function 'mono_domain_get'
i686-apple-darwin10-gcc-4.2.1: main.o: No such file or directory
(1) (XnaTouch.Samples.BouncingBox)

这些是我们替换 '/var/folders/hF/hF42FIdhEUmY1y-pGRsu1k++ 的原始消息+TI/-Tmp-/tmp159b7497.tmp/main' 和 'main')

有人可以解释这是如何由链接器选项引起的吗?采取第一个错误行:它不再找到头文件!?我们缺乏理解这一点的知识,并且非常感谢一些解释...

标签: Monotouch xnatouch iphone admob c#

Mtouch generation problem with XNATouch and btouch generated admob bindings.

We are experimenting with a btouch generated c# binding for the AdMob library on the iPhone. We have a test app produced by MonoDevelop/Monotouch. After copying the libAdMobNoThumb.a and the libTouchJSON.a in the project directory, we link it with following extra flags:

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

This works as expected, the AdMob banner ad functionality is operational.

As a next step, we want tot try this in an XNATouch program. We use the BouncingBox demo available in the XNATouch_1_0 download package. It compiles without errors and runs fine. But if we add the above extra flags (after copying the libs in the demo project directory), the compilation fails with following error messages:

Error 1: mtouch failed with the following message:
main.m:9:26: error: mono/jit/jit.h: No such file or directory
main.m:10:36: error: mono/metadata/assembly.h: No such file or directory
main.m:11:39: error: mono/metadata/mono-config.h: No such file or directory
main.m:12:38: error: mono/metadata/mono-debug.h: No such file or directory
main.m:13:26: error: monotouch/gc.h: No such file or directory
main.m:14:33: error: monotouch/monotouch.h: No such file or directory
main.m: In function 'main':
main.m:1811: error: 'MonoAssembly' undeclared (first use in this function)
main.m:1811: error: (Each undeclared identifier is reported only once
main.m:1811: error: for each function it appears in.)
main.m:1811: error: 'assembly' undeclared (first use in this function)
main.m:1813: error: 'MTSupport' undeclared (first use in this function)
main.m:1813: error: 'gcd' undeclared (first use in this function)
main.m:1838: warning: implicit declaration of function 'monotouch_enable_debug_tracking'
main.m:1899: error: 'MonoDebugOptions' undeclared (first use in this function)
main.m:1899: error: 'options' undeclared (first use in this function)
main.m:1921: error: expected expression before ')' token
main.m:1925: warning: implicit declaration of function 'mono_debugger_agent_parse_options'
main.m:1926: warning: implicit declaration of function 'mono_debug_init'
main.m:1926: error: 'MONO_DEBUG_FORMAT_MONO' undeclared (first use in this function)
main.m:1957: warning: implicit declaration of function 'mono_register_config_for_assembly'
main.m:1963: warning: implicit declaration of function 'mono_register_machine_config'
main.m:1969: warning: implicit declaration of function 'mono_jit_init_version'
main.m:1976: warning: implicit declaration of function 'monotouch_init'
main.m:1990: error: 'gchar' undeclared (first use in this function)
main.m:1990: error: 'tokens' undeclared (first use in this function)
main.m:1990: warning: implicit declaration of function 'g_strsplit'
main.m:1991: error: 'aname' undeclared (first use in this function)
main.m:1992: error: 'basename' undeclared (first use in this function)
main.m:2001: warning: implicit declaration of function 'g_strdup_printf'
main.m:2003: warning: implicit declaration of function 'g_strfreev'
main.m:2005: warning: implicit declaration of function 'monotouch_register'
main.m:2005: warning: implicit declaration of function 'mono_assembly_open'
main.m:2009: warning: implicit declaration of function 'g_free'
main.m:2019: warning: implicit declaration of function 'monotouch_get_has_classmap'
main.m:2020: warning: implicit declaration of function 'monotouch_map'
main.m:2056: error: 'guint64' undeclared (first use in this function)
main.m:2075: warning: implicit declaration of function 'mono_jit_exec'
main.m:2075: warning: implicit declaration of function 'mono_domain_get'
i686-apple-darwin10-gcc-4.2.1: main.o: No such file or directory
(1) (XnaTouch.Samples.BouncingBox)

(These are the original messages where we replaced '/var/folders/hF/hF42FIdhEUmY1y-pGRsu1k+++TI/-Tmp-/tmp159b7497.tmp/main' with 'main')

Can somebody explain how this can be caused by linker options? Take the first error line: it no longer finds header files!? We lack the knowledge to understand this, and would really appreciate some explanations...

Tags: Monotouch xnatouch iphone admob c#

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

迷你仙 2024-10-11 22:32:13

这不是问题。

这是由样本的设置引起的。他们仍然引用了我的系统上不存在的 sdk 4.0。

抱歉产生噪音。

This is a non-issue.

It was caused by the settings of the sample. They still referred to sdk 4.0 which does not exist on my system.

Sorry for the noise.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文