msys2安裝
前往 msys2 並下載 window7或以前請自求多福
Image Not Showing
Possible Reasons
The image was uploaded to a note which you don't have access to The note which the image was originally uploaded to has been deleted
Learn More →
不要改路徑 除非你能背起來
Image Not Showing
Possible Reasons
The image was uploaded to a note which you don't have access to The note which the image was originally uploaded to has been deleted
Learn More →
繼續 繼續 完成
開啟msys2
Image Not Showing
Possible Reasons
The image was uploaded to a note which you don't have access to The note which the image was originally uploaded to has been deleted
Learn More →
輸入
pacman -S mingw-w64-ucrt-x86_64-gcc
如果有詢問輸入 Y
前往環境變數(可以用左下角的搜尋)
Image Not Showing
Possible Reasons
The image was uploaded to a note which you don't have access to The note which the image was originally uploaded to has been deleted
Learn More →
選取 系統變數
中的 Path
然後按下 編輯
Image Not Showing
Possible Reasons
The image was uploaded to a note which you don't have access to The note which the image was originally uploaded to has been deleted
Learn More →
按 新增
然後貼上這段路徑 C:\msys64\usr\bin
如果有如果有變更路徑: 去資料夾找 你改的路徑+\usr\bin
Image Not Showing
Possible Reasons
The image was uploaded to a note which you don't have access to The note which the image was originally uploaded to has been deleted
Learn More →
確認是否安裝成功
按下 Windows
Image Not Showing
Possible Reasons
The image was uploaded to a note which you don't have access to The note which the image was originally uploaded to has been deleted
Learn More →
+ R
輸入 cmd
輸入 g++ --version
g+ + (Rev10, Built by MSYS2 project) 12.2 .0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
代表安裝成功
記得重啟vscode 和 終端機