• 5,739,870
    REGISTERED
  • 47,594
    ONLINE NOW

Understanding Cross Compiling and How it Relates to Android

Understanding Cross Compiling and How it Relates to Android

Cross compiling is the process of creating executable code for a platform other than the one actually doing the compiling. There are many reasons why this is of use, but arguably the most relevant is compiling for a platform that doesn’t have the required tools to build for itself.

A great example of cross compiling is building Android from source on your x86 machine. But even those who have built AOSP-based ROMs may not be familiar with the cross compiling process, as there are various tools available to make this incredibly streamlined. This then becomes a bit problematic when one wants to compile an external binary for use on the alternate platform.

Luckily, XDA Recognized Contributor JustArchi created a thorough and well explained guide on cross compiling. The guide itself begins with defining cross compiling and why it’s important. It then continues by showing users how to properly create a build environment. Then, the guide covers how to build a native C application for Android, as well as how to optimize the newly created native binaries.

If you wish to build external apps for Android devices or simply want to learn more about cross compiling on Linux, head over to the guide thread, grab a coffee, and read up.

_________
Join us for xda:devcon 2014. For a limited time, XDA Portal readers get 20% off registration!
Advertisment
Advertisement

XDA TV: Most Recent Video

Buy/Sell on Swappa

  • Nexus 5 (Unlocked) buy | sell
  • Galaxy Note 3 (T-Mobile) buy | sell
  • HTC One M7 (Verizon) buy | sell
  • Galaxy S 5 (Unlocked) buy | sell
  • Nexus 7 2013 buy | sell
  • Swappa is the official marketplace of XDA