我可以在Windows上运行linux代码吗? [英] can i run linux code on windows

查看:297
本文介绍了我可以在Windows上运行linux代码吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有什么方法可以运行我的linux代码,这是linux上运行的所有a.out

i在windows上运行。

plz告诉我的方式。

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.

推荐答案

是的,你可以。您必须重新编译源。 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
< br $> 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 :(


这篇关于我可以在Windows上运行linux代码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆