อันดับแรก เราต้องไปยัง Directory ที่เราจะเก็บไฟล์ C ของเรา
จากนั้น
1. ใช้คำสั่ง nano แล้วกด enter
- cnano.png (26.26 KiB) Viewed 2678 times
2. พิมพ์คำสั่ง C ที่เราต้องการ Run
- cwc.png (33.99 KiB) Viewed 2678 times
3. กด Ctrl+x เพื่อทำการออกจาก editor nano
4. editor nano จะถามเพื่อให้เราบันทึกชื่อไฟล์
- cnanosave1.png (30.28 KiB) Viewed 2678 times
5. กด Y เพื่อตกลง จากนั้นตั้งชื่อไฟล์เป็น test02.cpp แล้วกด enter
- csave2.png (34.24 KiB) Viewed 2678 times
6. ใช้คำสั่ง gcc test02.cpp -o ojtest เพื่อสร้าง object file (ตรง ojtest เป็นการตั้งชื่อ object file และหลังจาก enter จะสร้าง object file)
7. ใช้คำสั่ง ./ojtest เพื่อรัน object file
- cshow.png (44.71 KiB) Viewed 2678 times