以下是筆者使用的 C (mingw-w64).sublime-build 設定檔,其中 path 是 mingw-w64 binary 的安裝路徑。由於 Windows 系統預設的文字介面 (Command-Line Interface, CLI),也就是命令提示字元 (CMD),是使用 Big5 編碼的,因此必需設定 encoding 為 big5。
{
"path": "C:/Program Files/mingw-w64/x86_64-4.9.2-posix-seh-rt_v3-rev0/mingw64/bin",
"encoding": "big5",
"cmd": ["gcc.exe", "-Wall", "-static", "-static-libgcc", "$file", "-o",
"$file_base_name"]
}
以下是筆者使用的 C++ (mingw-w64).sublime-build 設定檔,規則同上。
{
"path": "C:/Program Files/mingw-w64/x86_64-4.9.2-posix-seh-rt_v3-rev0/mingw64/bin",
"encoding": "big5",
"cmd": ["g++.exe", "-Wall", "-static", "-static-libgcc", "-static-libstdc++",
"$file", "-o", "$file_base_name"]
}