2

I'm going to write an application for iOS, Mac OS X and Windows Phone 7.

To minimize the amount of work, I'd like to write the model only once, in C++ (otherwise I'd have to do it twice; in Objective-C and in C#).

Can I use C++ in a Windows Phone 7 application, together with C#?

  • A few websearches reveal that people have had some success with C++/CLI – David Heffernan Sep 04 '11 at 14:18
  • @David Where? Where? My Google-fu wasn't strong enough? The other SO links I have found are both negative: http://stackoverflow.com/questions/4539876/is-it-possible-to-program-for-windows-phone-7-in-standard-c-only and http://stackoverflow.com/questions/2455372/windows-phone-7-and-c-cli The only possibility is if you are an OEM or Microsoft :-) – xanatos Sep 04 '11 at 15:56
  • @xanatos http://stackoverflow.com/questions/3655313/which-programming-languages-does-windows-phone-7-wp7-support – David Heffernan Sep 04 '11 at 16:17
  • Duplicate: http://stackoverflow.com/questions/4539876/is-it-possible-to-program-for-windows-phone-7-in-standard-c-only/4540330#4540330 – Seva Alekseyev Sep 30 '13 at 13:28

2 Answers2

5

No you cannot use C++ for WP7 apps. However you might be able to use Monotouch to write some shared code in C# between the 2 platforms.

Paul Annetts
  • 9,554
  • 1
  • 27
  • 43
  • Agreed. If the application hasn't started development, you're better off going the other way and using Monotouch to share code. – Richard Szalay Sep 04 '11 at 14:19
3

Taken from here: Windows Mobile 7 and C++

All Windows Mobile 7 (now called Windows Phone 7 ) development, at least initially, will be in managed code. Development using native languages like C/C++ is not supported for third parties. You can develop apps and games for Windows Phone 7 using the Silverlight or XNA framework, and the initial release supports only C#, VB support is supposed to be coming out soon.

It's from June 2010.

xanatos
  • 109,618
  • 12
  • 197
  • 280