什么是由Windows和linux生成的可执行文件之间的区别 [英] what are the differences between an executable generated by windows and linux
本文介绍了什么是由Windows和linux生成的可执行文件之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:
b $ b
$
为什么在linux中编写的程序不能在windows中执行?假设我编译一个简单的C程序,包含Windows和linux共同的函数调用,编译器在windows和linux下生成不同的二进制文件?
解决方案<
大多数Linux可执行档都是 ELF 文件;所有Windows可执行文件和DLL都是 PE 文件。
Possible Duplicate:
Why an executable program for a specific CPU does not work on Linux and Windows?
Why can't programs written in linux be executd in windows ? Suppose I compile a simple C program containing function calls that are common to both windows and linux, Does the compiler generate different binary under windows and linux ?
解决方案
They use different container formats.
Most Linux executables are ELF files; all Windows executables and DLLs are PE files.
这篇关于什么是由Windows和linux生成的可执行文件之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文