Try   HackMD

msys2安裝

  1. 前往 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 →
  2. 不要改路徑 除非你能背起來
    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 →
  3. 繼續 繼續 完成
  4. 開啟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 →
  5. 輸入
pacman -S mingw-w64-ucrt-x86_64-gcc

如果有詢問輸入Y

  1. 前往環境變數(可以用左下角的搜尋)
    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 →
  2. 選取系統變數中的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 →
  3. 新增然後貼上這段路徑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 →

確認是否安裝成功

  1. 按下 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
  2. 輸入 cmd
  3. 輸入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 和 終端機