Why Windows programs don't run on MAC, Linux, Unix etc or Vice Versa? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why Windows programs don't run on MAC, Linux, Unix etc or Vice Versa?

All codes are converted to 0s and1s. 0s and 1s (binary code) is the language of all computers but why Windows program don't run on MAC, Linux, Unix. Vice Versa

22nd Jun 2021, 5:30 PM
Maxwell D. Dorliea
Maxwell D. Dorliea - avatar
4 Answers
+ 5
There are actually lots of reasons, not just one. The most basic is the binary format. Executables have a file format, and these formats vary between Operating Systems. You can overcome this of course, but then you’re left with all the system and API calls which exist on one OS, but not another. Just a really simple example might be an API on the Mac to set a menu item in the Apple menu. Windows of course has no such concept of an Apple menu. There are tens of thousands of APIs like that which exist on one OS, but not others. It’s kind of like going up to a French cardiac surgeon and talking to him in Spanish about car mechanics. Even if he could understand the language, he still wouldn’t understand what you were talking about. Taken the answer from: https://www.quora.com/What-is-the-reason-that-a-Windows-program-cannot-be-run-on-Linux-Mac-or-vice-versa
22nd Jun 2021, 5:32 PM
The future is now thanks to science
The future is now thanks to science - avatar
22nd Jun 2021, 5:37 PM
Maxwell D. Dorliea
Maxwell D. Dorliea - avatar
+ 2
Thanks alot
24th Jun 2021, 7:02 PM
Maxwell D. Dorliea
Maxwell D. Dorliea - avatar
+ 1
Because your compiled program doesn't run on machine directly It is running as child process of Operating System. Operating System is handing your program. Every operating system has its own way of inputting, outputting and other things. That is why library files for every operating systems are different which you link in executables
24th Jun 2021, 5:29 PM
🌀 Shail Murtaza شعیل مرتضیٰ
🌀 Shail Murtaza شعیل مرتضیٰ - avatar