当前位置:首页 > 虚拟机 > 正文

linux虚拟机怎么编译c文件


一、在linux虚拟机中怎么用c语言编译输出"hellolinux"。。。求详细过程。。。。

1.编译生成的可执行程序,例如:gcc-Whello.c-ohello

2.执行创建的可执行程序,例如:chmod+xhello;./hello3.编写源码:

#include

intmain()

{

printf("hellolinux\r\n");

return0;

}

扩展信息

在LinuxVirtual中,设备使用C语言编译输出“Helloworld”

#include

intmain()

{

printf("Helloworld"!/n");

return0;

}