是否可以仅使用标准 C++ 为 Windows Phone 7 编程? [英] Is it possible to program for Windows Phone 7 in standard C++ only?

查看:24
本文介绍了是否可以仅使用标准 C++ 为 Windows Phone 7 编程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道 Windows Phone 7 开发的推荐语言是 C#.

I know that the recommended language for Windows Phone 7 development is C#.

但是,出于各种原因,如果可能,我更愿意继续使用标准 C++ 进行编程.

However, for various reasons, I very much prefer continuing to program in standard C++, if possible.

是否可以仅使用标准 C++ 为 Windows Phone 7 编程?

Is it possible to program for Windows Phone 7 in standard C++ only?

如果答案是肯定的,那么我需要哪些工具和资源来实现这一目标?

If the answer is yes, what tools and resources do I need to accomplish that?

推荐答案

编辑,最后:对于 WP7,它永远不会,但对于 Windows Phone 8 - 是的,你可以.本机应用程序、C/C++、iOS/Android 可移植性和代码共享、DirectX.不过,您需要 Visual Studio 2012 和 Windows 8 才能进行 WP8 开发.VS2010 没有获得必要的 SDK.要运行模拟器,您需要一个 64 位 物理 Windows 8 框和 SLAT 启用的 CPU.您仍然可以在虚拟机上进行开发,但您需要一个设备来运行应用程序,模拟器将无法启动.

EDIT, finally: for WP7 it won't ever be, but for Windows Phone 8 - yes you can. Native apps, C/C++, iOS/Android portability and code sharing, DirectX. You'll need Visual Studio 2012 and Windows 8 for WP8 development, though. VS2010 is not getting the requisite SDK. To run the emulator, you'll need a 64-bit physical Windows 8 box with a SLAT-enabled CPU. You can still develop on a virtual machine, but you'd need a device to run apps, the emulator won't start.

但是,非游戏 UI 仍将基于 XAML 并进行管理.将不支持整个 Win32 API.他们正在推动一个带有托管 UI 层和其下的本机中间件的模型.原生开发仍然不是一种选择;尽管人们可能会尝试使用 WinMD 类作为 XAML 的代码隐藏.可视化 XAML 设计器可能会窒息,无论如何您都需要一个虚拟的托管 DLL.

The nongame UI, however, will still be XAML-based and managed. The entirety of Win32 API will not be supported. They're pushing a model with managed UI layer and a native middleware beneath it. Purely native development is still not an option; although one might try with WinMD classes as code-behind for XAML. The visual XAML designer will probably choke, and you'll need a dummy managed DLL anyway.

即使是汇编,只要它针对 Thumb-2 并且助记符是 UAL 风格的.要在模拟器上运行,您必须生成一组针对英特尔的替代程序集文件(或其他来源).

even assembly, as long as it's targeting Thumb-2 and the mnemonics are UAL-style. For running on the simulator, you'd have to produce an alternative set of assembly files (or other sources) targeting Intel.

为了后代,这是 2012 年 6 月 20 日之前的回答:

For the sake of posterity, here's the pre-06/20/2012 answer:

如果您为 Microsoft 或 OEM 工作,那么可以.否则,不(暂时).

If you work for Microsoft or an OEM, then yes. Otherwise, no (for now).

不过还是有希望的.谷歌确实在一段时间后松了口气,并发布了他们的 NDK;微软也可能.本机代码功能已经存在.一旦他们提出了一个合理的沙盒解决方案,为什么不呢.

There's hope though. Google did relent and issued their NDK after a while; Microsoft might, too. The native code capability is already there. Once they come up with a sensible sandboxing solution, why not.

此外,知名软件供应商已经施加了一些压力,要求开放原生开发.Mozilla 人员直言不讳地说 WP7 上不会有 Firefox,除非它是原生的.关于 Flash 的类似传闻.

Also, there's already some pressure from big-name software vendors to open up native development. Mozilla people stated outright that there will be no Firefox on WP7 unless it's native. Similar rumors about Flash.

如果你想在 WP7 上使用原生 SDK,就像我一样,请登录 此处的请愿书 和/或 那边的那个.谢谢!

if you want a native SDK on WP7, like I do, please go sign the petition here and/or the one over there. Thank you!

这个.这是一次泄密,因此不是官方的,但我仍然说有一些希望.

see this. It's a leak and therefore not official, but still, I say there's some hope.

还有 这个.仍然不是官方的,但这个谣言使原生应用支持的时间框架更接近于即将发布的 Tango.

also this. Still not official, but this rumor moves the timeframe for native app support even closer - to the upcoming Tango release.

微软似乎非常热衷于推广 WinRT,这是他们新的面向平板电脑的基于 XAML 的应用平台,允许(除其他外)非托管 C++.现在,在其他所有主要的移动操作系统上,平板电脑和手机应用程序堆栈都是一样的.就说吧.

Microsoft seems to be pretty keen to promote WinRT, their new tablet-oriented XAML-based app platform, which allows for (among other things) unmanaged C++. Now, on every other major mobile OS the tablet and the phone app stacks are one and the same. Just sayin'.

有一些符合 C++ => LLVM => MSIL 和 C++ => LLVM => C# 的概念验证工作,但到目前为止还没有任何生产质量.

there's been some proof-of-concept work along the lines of C++ => LLVM => MSIL and C++ => LLVM => C#, but nothing production-quality so far.

这篇关于是否可以仅使用标准 C++ 为 Windows Phone 7 编程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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