How to execute Mach-O 32-bit C++ program on Linux?
Solution 1
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.
Solution 2
You may be able to run it under PureDarwin using VirtualBox.
"Darwin is the Open Source operating system from Apple that forms the basis for Mac OS X, and PureDarwin is a community project to make Darwin more usable (some people think of it as the informal successor to OpenDarwin)."
http://www.puredarwin.org/developers/virtualbox#TOC-Ubuntu-Virtual-Box-4
Related videos on Youtube
user1880405
Updated on September 18, 2022Comments
-
user1880405 over 1 year
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?
-
Admin over 9 yearsNo, your problem is having a Mach-O executable. Wikipedia says "Mach-O was once used by most systems based on the Mach kernel.[citation needed] NeXTSTEP, OS X, and iOS are examples of systems that have used this format for native executables, libraries and object code."
-
Admin over 9 yearsAlright, so I cannot execute it on my machine?
-
Admin over 9 yearsFrom this related question listed on the side, no, it looks like there is currently no way to run it on Linux.
-