且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我可以在Windows上运行linux代码吗?

更新时间:2023-09-30 14:58:34

是的,你可以。您必须重新编译源。 Linux可执行文件无法在Windows中执行
。使用库和一些更改可以

重新编译源

参考:
http://cygwin.com/

Yes you can. You have to recompile the source. Linux executables cannot
be executed in windows. Using libraries and some changes one can
recompile the source
Refer:
http://cygwin.com/


sachin dooble< sa ******* ****@gmail.com>写道:
sachin dooble <sa***********@gmail.com> wrote:
有没有任何方法我可以运行我的linux代码,这是我在linux上运行的所有a.out
在Windows上运行。
请告诉我的方式。
is there any method where i can run my linux code that is all the a.out
i made on linux to run on windows.
plz tell me the way.




如果你的''代码'是普通的C并且你有一个微软的编译器,你应该

没有问题编译代码并运行它。


如果您拥有的只是二进制文件,那么您就是SOL。


- Philip
b $ b -

Philip Paeps请不要回复任何回复
ph **** @ paeps.cx 我关注新闻组。


BOFH借口#130:

新管理层



If your ''code'' is plain C and you have a compiler for Microsoft, you should
have no problems compiling the code and running it.

If all you have is the binary, you''re SOL.

- Philip

--
Philip Paeps Please don''t email any replies
ph****@paeps.cx I follow the newsgroup.

BOFH Excuse #130:
new management




sachin dooble写道:

sachin dooble wrote:
有什么方法可以运行我的linux代码,这是所有a.out
我在linux上运行在Windows上运行。
请告诉我。
is there any method where i can run my linux code that is all the a.out
i made on linux to run on windows.
plz tell me the way.



是这是最困难的方式。如果你知道windows如何执行

以及linux如何执行那么你可以尝试解释linux

可执行文件(ELF)并使其成为windows可执行文件(PE)。但是运行库支持会出现问题,所以你会做什么?


为什么你有兴趣降级Linux可执行文件:(


yes That is the hardest way arround. If you know how windows executes
and how linux executes then you can try to interprete the linux
executable(ELF) and make it into windows executable(PE). but there will
be issues for runtime library support, so what you will you do???

Moreover why you are interested to demote linux executables :(