Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
272 views
in Technique[技术] by (71.8m points)

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

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

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

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

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.

EDIT: 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.

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


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

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.

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.

EDIT: 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!

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

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

EDIT4: 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'.

EDIT5: 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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...