1、在Ubuntu中搭建C語言的編輯環境


1、在Ubuntu中搭建C語言的編輯環境

 

1、安裝Ubuntu虛擬機

2、安裝vim(編輯器),gcc(編譯器)和build-essential(編譯程序必須軟件包的列表信息)

sudo apt

sudo apt-get install vim

sudo apt-get install gcc

sudo apt-get install build-essential

3、編寫hello world.c

1 #include<stdio.h>
2 int main() 3 { 4         printf("hello world\n"); 5         return 0; 6 }

4、編譯:

1 gcc helloworld.c -o hello

 

5、運行:

1 ./hello

 

PS:  gcc helloworld.c   -- > helloworld.out


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM