> For the complete documentation index, see [llms.txt](https://docs.aic-eec.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aic-eec.com/c-c++-for-embedded-programming/development-environment-preparation/visual-studio-code.md).

# ติดตั้งโปรแกรม Visual Studio Code

1. download โปรแกรม คลิ๊ก [Visual Studio Code](https://code.visualstudio.com/#alt-downloads) download ตามระบบ OS ที่ใช้งาน&#x20;

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MClo3nC-1US0rbK8Qau%2Fuploads%2FeVXcZz7enD6rL0rm3ZBB%2Ffile.png?alt=media)

2\. ติดตั้ง C/C++ extension สำหรับ VS Code &#x20;

&#x20;          2.1 ไปที่ Manage >> Extensions &#x20;

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MClo3nC-1US0rbK8Qau%2Fuploads%2FStviqKfuBp75b4SvxMvb%2Ffile.png?alt=media)

&#x20;                 2.2 ค้นหา C/C++ Extension Pack >> คลิ๊ก Install

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MClo3nC-1US0rbK8Qau%2Fuploads%2FvJMp95IbTfwrLL4ESglL%2Ffile.png?alt=media)

3\. ติดตั้ง MinGW-W64

&#x20;      3.1  คลิ๊กเพื่อ ดาวน์โหลด [Mingw-w64](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download)&#x20;

&#x20;      3.2  ติดตั้งโปรแกรม&#x20;

&#x20;      3.3  ตั้งค่า Architecture เลือก x86\_64 แล้วคลิ๊ก Next.

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MClo3nC-1US0rbK8Qau%2Fuploads%2FAax8txX2BYCVWykL1XPA%2Ffile.png?alt=media)

4\. ตั้งค่า Path

&#x20;    4.1 ไปที่ Start >> setting

&#x20;    4.2 ค้นหา "*Edit environment variables for your account"*

![](https://1856353139-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MClo3nC-1US0rbK8Qau%2F-MNWWbZo9H42KSQrcTvs%2F-MNWZQRsY5Ka2sdwRx42%2FUntitled.png?alt=media\&token=8ca344b6-99ce-4233-85d7-db2e4928a62c)

&#x20;     4.3 ไปที่ User variables for (Name PC)

&#x20;     4.4 เลือก Path >> Edit

&#x20;     4.5 คลิ๊ก New ใส่ค่าดังนี้&#x20;

C:\Program Files\mingw-w64\x86\_64-8.1.0-posix-seh-rt\_v6-rev0\mingw64\bin

&#x20;    4.6 คลิ๊ก OK&#x20;

5\. เมื่อติดตั้งเสร็จแล้วให้ใช้คำสั่งบน Terminal (command prompt) เพื่อตรวจสอบว่าได้ตั้งค่า path ได้ถูกต้องหรือยังดังนี้

```
g++ --version 
```

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MClo3nC-1US0rbK8Qau%2Fuploads%2F2cBf1aZTpw5WxEhjFAeg%2Ffile.png?alt=media)

```
gdb –version 
```

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MClo3nC-1US0rbK8Qau%2Fuploads%2FlDdUIv6TxQxU8yi05mUy%2Ffile.png?alt=media)

แหล่งอ้างอิง

<https://code.visualstudio.com/docs/cpp/config-mingw>
