Point 2 is the reason executables on one OS just plain 'don't work' on other operating systems. These two points are worth discussion in their own right, and as Joachim pointed out in the comments, the WINE emulator is quite good at emulating a windows environment on Linux, so this may be an option for program compatibility.ĮDIT: I should add here that Point 1 assumes that Point 2 has been overcome. Linux can only read executables in ELF format, and Mac OS X uses the Mach-O format. exe file which is Microsoft's Portable Executable format.
(And probably more importantly,) the Windows executable you have created is a Windows. If you attempt the run these instructions on a different OS, the OS will complain that it doesn't understand them and the program will crash. You use system instructions which are not supported by other operating systems. There are a few reasons why this program won't work on other machines - I will summarise the two main ones: