This commit is contained in:
iridiumR 2021-11-12 16:44:13 +08:00
parent b3bff49b45
commit 9f20e81f4d
3 changed files with 115 additions and 36 deletions

View file

@ -1,22 +1,22 @@
{ {
"configurations": [ "configurations": [
{ {
"name": "Win32", "name": "MinGW",
"intelliSenseMode": "clang-x64",
"compilerPath": "C:/Program Files/LLVM/bin/gcc.exe",
"includePath": [ "includePath": [
"${workspaceFolder}/**", "${workspaceFolder}"
"C:/Project/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include",
"C:/Project/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed",
"C:/Project/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/include"
], ],
"defines": [ "defines": [],
"_DEBUG", "browse": {
"UNICODE", "path": [
"_UNICODE" "${workspaceFolder}"
], ],
"compilerPath": "C:/Project/mingw64/bin/g++.exe", "limitSymbolsToIncludedHeaders": true,
"cStandard": "c17", "databaseFilename": ""
"cppStandard": "c++17", },
"intelliSenseMode": "windows-gcc-x64" "cStandard": "c11",
"cppStandard": "c++17"
} }
], ],
"version": 4 "version": 4

77
.vscode/settings.json vendored
View file

@ -1,4 +1,75 @@
{ {
"C_Cpp.errorSquiggles": "Enabled", "files.defaultLanguage": "cpp", // ctrl+N
"files.encoding": "gb2312" "editor.formatOnType": true, //
} "editor.snippetSuggestions": "top", // snippets
"code-runner.runInTerminal": true, // false
"code-runner.executorMap": {
"c": "cd $dir && gcc *.c -fexec-charset=gb2312 -o $fileNameWithoutExt.exe && $dir$fileNameWithoutExt.exe",
"cpp": "cd $dir && g++ *.cpp -fexec-charset=gb2312 -o $fileNameWithoutExt.exe && $dir$fileNameWithoutExt.exe"
// "c": "cd $dir && clang $fileName -o $fileNameWithoutExt.exe -Wall -g -Og -static-libgcc -fcolor-diagnostics --target=x86_64-w64-mingw -std=c11 && $dir$fileNameWithoutExt",
// "cpp": "cd $dir && clang++ *.cpp -o $fileNameWithoutExt.exe -Wall -g -Og -static-libgcc -fcolor-diagnostics --target=x86_64-w64-mingw-g++ -std=c++17 && $dir$fileNameWithoutExt"
// "cpp": "cd $dir && clang++ *.cpp -o $fileNameWithoutExt.exe -Wall -g -Og -static-libgcc -fcolor-diagnostics --target=x86_64-w64-mingw -std=c++14 && $dir$fileNameWithoutExt"
}, // code runner
"code-runner.saveFileBeforeRun": true, // run code
"code-runner.preserveFocus": true, // falserun codefalse
"code-runner.clearPreviousOutput": false, // run codecode runner
"C_Cpp.clang_format_sortIncludes": true, // include
"C_Cpp.intelliSenseEngine": "Default", // DefaultTag Parsercpptools
"C_Cpp.errorSquiggles": "Disabled", // clanglint
"C_Cpp.autocomplete": "Disabled", // clang
"clang.cflags": [ // c
"--target=x86_64-w64-mingw",
"-std=c11",
"-Wall"
],
"clang.cxxflags": [ // c++
"--target=x86_64-w64-mingw",
"-std=c++17",
"-Wall"
],
"clang.completion.enable": true,
"files.associations": {
"iostream": "cpp",
"string": "cpp",
"array": "cpp",
"atomic": "cpp",
"*.tcc": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"optional": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"initializer_list": "cpp",
"iosfwd": "cpp",
"istream": "cpp",
"limits": "cpp",
"new": "cpp",
"ostream": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"typeinfo": "cpp"
} // cpptools
}

46
.vscode/tasks.json vendored
View file

@ -1,25 +1,33 @@
// https://code.visualstudio.com/docs/editor/tasks
{ {
"version": "2.0.0",
"tasks": [ "tasks": [
{ {
"type": "cppbuild", "label": "Compile", // launch.jsonpreLaunchTask
"label": "Compile", "command": "clang++", // 使
"command": "g++",
"args": [ "args": [
"${fileDirname}\\*.cpp", "${file}",
"-g", "-o", // a.exe
// "-fexec-charset=gb2312", "${fileDirname}/${fileBasenameNoExtension}.exe",
"-o", "-g", //
"${fileDirname}\\${fileBasenameNoExtension}.exe" "-Wall", //
], "-static-libgcc", //
"options": { "-fcolor-diagnostics",
"cwd": "C:/Project/mingw64/bin" "--target=x86_64-w64-mingw", // targetmsvc
"-std=c++17" // Cc11
], //
"type": "shell",
"group": {
"kind": "build",
"isDefault": true // falsetasks.json
}, },
"problemMatcher": [ "presentation": {
"$gcc" "echo": true,
], "reveal": "always", // alwayssilentneverVSC
"group": "build", "focus": false, // true使taskcc++true
"detail": "编译器: C:/Project/mingw64/bin/g++.exe" "panel": "shared" //
}
// "problemMatcher":"$gcc" // 使clang)
} }
], ]
"version": "2.0.0" }
}