简体   繁体   English

如何在WP7的XNA项目中包含.c文件

[英]How to include a .c file in my XNA project for WP7

I'm developing a game for Windows Phone using the XNA framework. 我正在使用XNA框架为Windows Phone开发游戏。 I want to add a .c file to my project, but I'm not getting a solution for it. 我想将.c文件添加到我的项目中,但没有得到解决方案。 Can anyone tell me how to add it/access it? 谁能告诉我如何添加/访问它?

The obvious option would be to reimplement the C method in C# (or VB.Net if you prefer) and call it like that. 显而易见的选择是在C#中重新实现C方法(或者如果愿意,可以使用VB.Net)并像这样调用它。 The apps on Windows Phone are sandboxed, and cannot run any "native" code. Windows Phone上的应用已沙箱化,无法运行任何“本机”代码。

At this moment you have to implement you C code in any language that can be compiled to .Net CF IL (C#, VB.Net, F# etc.). 此时,您必须以可以编译为.Net CF IL(C#,VB.Net,F#等)的任何语言来实现C代码。 Or you can wait roughly 5 months for WP8 which is very likely to run some C/C++ code. 或者您可以等待大约5个月的WP8,这很可能会运行某些C / C ++代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM