วิธีติดตั้ง Compiler (Dev-C++ 5.11, TDM-GCC 4.9.2)
- ติดตั้ง Dev-C++ 5.11 (Link)
- ตั้ง Environment path
- สำหรับ Windows
-
Search ใน Windows ว่า
Edit the system enviroment variablesและเปิด
-
กด
Environment Variables...
-
ช่องล่าง System Variables
-
เลือก
PathกดEdit
-
กด
Newเอาที่อยู่ Compiler มาใส่- เช่น ติดตั้ง Dev-C++ ไว้ที่
D:\\Programs\\Dev-Cppที่อยู่จะอยู่ที่D:\\Programs\\Dev-Cpp\\MinGW64\\bin
- เช่น ติดตั้ง Dev-C++ ไว้ที่
-
กด
OK
-
- สำหรับ Windows
วิธีรัน โดยใช้ Terminal
- ทำให้แน่ใจว่า Terminal อยู่ที่เดียวกับ ไฟล์
.cเราpwd: เช็คที่อยู่ Folder ปัจจุบันls: รายชื่อไฟล์ ใน Folder ปัจจุบัน
- Compile
gcc a.c- Run
./a.exe- หรือ Compile พร้อมกับ Run
gcc a.c && ./a.exeBack to cscourse