Why an executable program for a specific CPU does not work on Linux and Windows?

后端 未结 6 1567
滥情空心
滥情空心 2020-12-01 09:29

An executable problem like exe does not work on Linux (without wine). When compiling source code compiler produce object code which is specific to a particular cpu architect

6条回答
  •  半阙折子戏
    2020-12-01 10:13

    Yes, but, the code invariably calls out to library functions to do just about anything -- like printing "4" to the terminal. And these libraries are platform-specific, and differ between Linux and Windows. This is why it's not portable -- not, indeed, an instruction-level problem.

提交回复
热议问题