简体   繁体   English

如何在xv6操作系统中运行ac程序

[英]How to run a c program in xv6 operating system

我是xv6操作系统的新手,我想在xv6中运行C程序,其中是否有命令或某些内容可以编译和运行C程序?

Xv6 is a simple Unix-like teaching operating system Xv6是一个简单的类似Unix的教学操作系统

open the terminal and to compile 打开终端并进行编译

gcc program-source-code.c -o executable-file-name

and execute 并执行

./ executable-file-name

I think it is not possible to compile using gcc and put directly ur code into xv6, You have to write file like stressfs.c cat.c of xv6 source code within the xv6 source code and then add your file in the Makefile of the xv6 then you can run ur code into xv6 shell. 我认为无法使用gcc进行编译并将您的代码直接放入xv6中,您必须在xv6源代码中编写xv6源代码的Stressfs.c cat.c之类的文件,然后将文件添加到xv6的Makefile中然后您可以将您的代码运行到xv6 shell中。 I tried gcc but it didn't work for me 我尝试了gcc,但对我没有用

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

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