Building a Windows 8 app, developers can choose HTML/JavaScript, XAML/.Net (C#/VB), and XAML/C++. I want to write my app in XAML/C++.
Building applications in the first two choices almost guarantees that your application will execute on both Intel and ARM architectures.
But I have heard that if I do certain things in my C++ app, I can cause the application NOT to execute on the ARM architecture. But I don’t know the details.
Does anyone know what C++ Windows 8 apps should avoid so that they can run on ARM okay? Are these architecture decision or just differences in technique?
In order to run on each architecture you first need to compile for each architecture obviously. If you write standard C++ (and if you do not rely on undefined behaviour and/or platform specific behaviour) you are fine the things that usually cause troubles when porting between architectures is:
(this list is an example)
Usually you are safe if you refrain from crazy pointer arithmetic and casting.