Skip to content

Instantly share code, notes, and snippets.

@prinsss
Created December 19, 2019 09:54
Show Gist options
  • Save prinsss/bcfa32a33cc268945200cb23172f262d to your computer and use it in GitHub Desktop.
Save prinsss/bcfa32a33cc268945200cb23172f262d to your computer and use it in GitHub Desktop.
C/C++ project quick setup on VS Code. ( https://printempw.github.io/vscode-cpp-project-quick-setup/ )
{
"configurations": [
{
"name": "MinGW G++",
"intelliSenseMode": "gcc-x64",
"compilerPath": "C:\\Portable\\mingw64\\bin\\g++.exe",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"cStandard": "c11",
"cppStandard": "c++17"
}
],
"version": 4
}
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/${workspaceFolderBasename}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "C:\\Portable\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "compile"
}
]
}
{
"version": "2.0.0",
"tasks": [
{
"label": "compile",
"type": "shell",
"command": "g++",
"args": [
"-g",
"-std=c++1z",
"\"src/*.cpp\"",
"-o",
"\"build/${workspaceFolderBasename}\""
],
"options": {
"cwd": "${workspaceFolder}",
"shell": {
"executable": "powershell.exe"
}
},
"presentation": {
"reveal": "always",
"panel": "shared",
"focus": false,
"echo": true
},
"problemMatcher": ["$gcc"],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment