U
U
user7770002020-05-30 14:56:15
Programming
user777000, 2020-05-30 14:56:15

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

1 answer(s)
S
Saboteur, 2020-05-30
@saboteur_kiev

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 question

Ask a Question

731 491 924 answers to any question