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": [
{
"name": "Win32",
"name": "MinGW",
"intelliSenseMode": "clang-x64",
"compilerPath": "C:/Program Files/LLVM/bin/gcc.exe",
"includePath": [
"${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"
"${workspaceFolder}"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
"defines": [],
"browse": {
"path": [
"${workspaceFolder}"
],
"compilerPath": "C:/Project/mingw64/bin/g++.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-gcc-x64"
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"cStandard": "c11",
"cppStandard": "c++17"
}
],
"version": 4

75
.vscode/settings.json vendored
View file

@ -1,4 +1,75 @@
{
"C_Cpp.errorSquiggles": "Enabled",
"files.encoding": "gb2312"
"files.defaultLanguage": "cpp", // ctrl+N
"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
}

44
.vscode/tasks.json vendored
View file

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