Answer the question
In order to leave comments, you need to log in
How do programs run on different operating systems?
Let's say the game is written in C++. I download it and it runs on my computer. How does this happen? Is there an interpreter in the game folder that runs files with program code? How does the operating system affect this?
Explain, please, to me these moments simply and clearly.
Answer the question
In order to leave comments, you need to log in
C++ code is compiled into an executable file.
For Windows, the compiler produces an .exe file
. For Linux, one of the options for Linux executable files (ELF)
Executable files contain, without going into details, instructions for the processor, calling operating system functions.
The C++ code itself can be cross-platform, providing for its ability to be compiled for different platforms.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question