Linux – How to execute Mach-O 32-bit C++ program on Linux

executablelinuxosx

I want to execute a program (which I know was written in C++), but I get this error:

zsh: exec format error: ./myProgram

Output of file myProgram:

myProgram: Mach-O i386 executable

My system is a 64-bit Linux. I also tried on a 32-bit Ubuntu VM, but I get:

bash: ./myProgram: cannot execute binary file: Exec format error

Why wasn't I able execute that program? How can I execute it?

Best Answer

You might have luck with Darling:

Darling is a translation layer that allows you to run unmodified OS X binaries on Linux. In its nature, it is similar to the well-known Wine project.

At this point, it is unlikely that Darling will run your favorite OS X application. For more information, review the Project Status. Developers are always welcome to join the project.

http://www.darlinghq.org/

Related Question