# ติดตั้งโปรแกรม 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"*

![](/files/-MNWZQRsY5Ka2sdwRx42)

&#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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aic-eec.com/c-c++-for-embedded-programming/development-environment-preparation/visual-studio-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
