I have made a command line application in Swift. When I run the executable product it produces on my Mac, everything is fine and it works as expected. But when I copy the executable over to my Linux machine, it doesn't work and produces the following error:
-sh: ./script: cannot execute binary file: Exec format error
I assume that this is because Linux and MacOS use different executable file formats. With this in mind, I was wondering if it is possible to build the executable product in a format that will be able to run on my Linux machine, but I haven't been able to find any straightforward way to do this in Xcode thus far. Another option might be to convert the executable file to a supported format but I'm not sure if that is something that one can do either.
Here are the details on my Linux machine:
Operating System: FSLC Wayland 3.1 (dunfell) Kernel: Linux 5.4.85+gedb81d8afdfe Architecture: arm64
How can I fix this to get the executable running on my Linux machine?