Skip to content

Instantly share code, notes, and snippets.

@assiless
Created November 12, 2021 20:09
Show Gist options
  • Save assiless/f2647c000667a4a4a6364a6d9f7b86cd to your computer and use it in GitHub Desktop.
Save assiless/f2647c000667a4a4a6364a6d9f7b86cd to your computer and use it in GitHub Desktop.
msys2 in vscode
{
"configurations": [{
"name": "Win32",
"includePath": [
"C:\\msys64\\mingw64\\include",
"C:\\msys64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\11.2.0\\include",
"${workspaceFolder}/**"
],
"defines": ["_DEBUG", "UNICODE", "_UNICODE"],
"compilerPath": "C:\\msys64\\mingw64\\bin\\g++.exe",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "${default}"
}],
"version": 4
}
{
// ${workspaceFolder} - /home/your-username/your-project
// ${workspaceFolderBasename} - your-project
// ${file} - /home/your-username/your-project/folder/file.ext
// ${relativeFile} - folder/file.ext
// ${fileBasename} - file.ext
// ${fileBasenameNoExtension} - file
// ${fileDirname} - /home/your-username/your-project/folder
// ${fileExtname} - .ext
// ${lineNumber} - 5
// ${selectedText} - Text selected in your code editor
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
// "internalConsoleOptions": "neverOpen",
"MIMode": "gdb",
"miDebuggerPath": "C:\\msys64\\mingw64\\bin\\gdb.exe",
"preLaunchTask": "gcc",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build Pursuit.cpp",
"type": "shell",
"command": "g++",
"args": [
// "-std=c11",
"-g",
"-fexec-charset=GBK",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}.exe",
"-Wall",
"-static-libgcc"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment