What in C++ can make Windows 8 apps not run on ARM?
c++, microsoft-metro, windows-8
Solution
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)
- sizes of int, long, long long (and others) can differ between platforms
- signedness of char
- how structures are padded
- binary layout of floats
- endianess
- and more so on.
Usually you are safe if you refrain from crazy pointer arithmetic and casting.
Problem
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?