1

I built a c++ executable for Ubuntu on i7 x64 machine. Can I take the same executable and run on a Raspberry Pi running Ubuntu? Or do I need to rebuild the program for it's ARM architecture?

jdl
  • 153
  • 4
  • Nope, you will need to re-compile it for ARM. If you have one, you could use an actual Raspberry Pi for compiling the ARM version, or you could [cross-compile it](https://askubuntu.com/q/250696/1438484). Cross compiling will work better if it is a more complex app (it will be faster). Also keep in mind that there are multiple versions of ARM (ARM64, ARM7l which is 32-bit, and more). So remembre to compile for the right ARM versions. Different Raspberry Pi's are different versions of ARM. Or on a Pi 4, for example, it can run a 32 bit _or_ 64 bit OS. So compile for the right version of ARM. – cocomac May 26 '22 at 21:18
  • I yes ish you need to use multiarch https://wiki.debian.org/Multiarch/HOWTO on the meshine that you are running executable on – lnee May 26 '22 at 23:00

0 Answers0