Why do we need to compile for different platforms (e.g. Windows/Linux)?

前端 未结 4 1937
感动是毒
感动是毒 2021-01-02 11:51

I\'ve learned the basics about CPUs/ASM/C and don\'t understand why we need to compile C code differently for different OS targets. What the compiler does is create Assemble

4条回答
  •  悲&欢浪女
    2021-01-02 12:28

    You might want to check the other answers.

    Its kind of duplicate question except that its for C not C++

    You can check process of compilation steps here:

    C compilation steps

    In short , even though C is can be cross platform to run, due to compilers its not cross-platform compile-able.

提交回复
热议问题