Skip to content

Instantly share code, notes, and snippets.

@dhirabayashi
Created June 18, 2022 08:11
Show Gist options
  • Select an option

  • Save dhirabayashi/47e88f566aade80b916487ea75f55543 to your computer and use it in GitHub Desktop.

Select an option

Save dhirabayashi/47e88f566aade80b916487ea75f55543 to your computer and use it in GitHub Desktop.
WSL C++構成
{
"configurations": [
{
"name": "WSL",
"includePath": ["${workspaceFolder}/**", "/usr/include/**"],
"defines": ["_DEBUG", "UNICODE", "_UNICODE"],
"compilerPath": "/usr/bin/gcc-9",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}
{
// IntelliSense を使用して利用可能な属性を学べます。
// 既存の属性の説明をホバーして表示します。
// 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) 起動",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerArgs": "-q -ex quit; wait() { fg >/dev/null; }; /bin/gdb -q --interpreter=mi",
"setupCommands": [
{
"description": "gdb の再フォーマットを有効にする",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "逆アセンブリ フレーバーを Intel に設定",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++ アクティブなファイルのビルド"
}
]
}
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "C/C++: g++-9 compile file",
"command": "/usr/bin/g++-9",
"args": [
"-std=gnu++17",
"-Wall",
"-Wextra",
"-Wshadow",
"-Wconversion",
"-fsanitize=undefined",
"-ggdb",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"problemMatcher": [
"$gcc"
],
"group": "build"
},
{
"type": "cppbuild",
"label": "C/C++: g++ アクティブなファイルのビルド",
"command": "/usr/bin/g++",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "デバッガーによって生成されたタスク。"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment