简体   繁体   English

在Windows下为Linux编码?

[英]Coding for Linux under Windows?

i am using SoC FPGA+ARM A9 system. 我正在使用SoC FPGA + ARM A9系统。 The ARM A9 will run Linux Yocto. ARM A9将运行Linux Yocto。 I want to write some software for this Linux on C or Python language. 我想为此语言在C或Python语言上编写一些软件。 My question is, do i need to install Linux on my Windows desktop in order to develop software for Linux, or is there some kind of Linux Shell/emulator, in which i can test my code under Windows 7? 我的问题是,我是否需要在Windows桌面上安装Linux才能开发用于Linux的软件,或者是否存在某种Linux Shell /模拟器,可以在Windows 7下测试我的代码?

Python code is fairly portable as long as you don't use Windows specific modules or functions. 只要您不使用Windows特定的模块或函数,Python的代码都是可移植的。 And as abarnert rightly mentions, some functions act differently on different operating systems. 正如abarnert正确提到的那样,某些功能在不同的操作系统上的作用不同。 And not all functions are available on all platforms. 并非所有功能在所有平台上都可用。 But this is generally mentioned in the documentation. 但这通常在文档中提到。

You could set up a cross-compiler for Linux on Windows, but it is more ofter done the other way around, because Linux in general comes with more developer tools and has better infrastructure for installing software packages. 您可以在Windows上为Linux 设置交叉编译器 ,但是反之则相反,因为Linux通常带有更多的开发人员工具,并且具有用于安装软件包的更好的基础结构。

What you could do is set up a virtual machine (like virtualbox , vmware or qemu ) running Linux. 您可以做的是设置运行Linux的虚拟机(例如virtualboxvmwareqemu )。 That will enable you to get experience with Linux and its development tools. 这将使您获得Linux及其开发工具的经验。

If you are using an Altera board, it seems that their tools (Board Support Package) only run on Linux. 如果您使用的是Altera板,则似乎它们的工具(板支持包)仅在Linux上运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM