This commit is contained in:
Bluemangoo 2025-03-14 18:14:53 +08:00
parent a886e85965
commit f9d6b0d528
Signed by: Bluemangoo
GPG Key ID: F2F7E46880A1C4CF
4 changed files with 7 additions and 10 deletions

View File

@ -1,2 +1,2 @@
CompileFlags: CompileFlags:
Add: [-IC:/ProgramData/mingw64/mingw64/include, -IC:/ProgramData/mingw64/mingw64/x86_64-w64-mingw32/include] Add: [-IC:/ProgramData/mingw64/mingw64/include, -IC:/ProgramData/mingw64/mingw64/x86_64-w64-mingw32/include, -std=c89]

View File

@ -10,10 +10,10 @@
"description": "Define function swap two var with macro" "description": "Define function swap two var with macro"
}, },
"Define var swapper": { "Define var swapper": {
"prefix": "fn_var_swapper", "prefix": "fn_define_swapper",
"body": [ "body": [
"#define SWAPPER(type, name) \\", "#define DEFINE_SWAPPER(type) \\",
" void name(type *a, type *b) { \\", " void swap_##type(type *a, type *b) { \\",
" type t = *a; \\", " type t = *a; \\",
" *a = *b; \\", " *a = *b; \\",
" *b = t; \\", " *b = t; \\",

View File

@ -3,18 +3,14 @@
{ {
"name": "Win32", "name": "Win32",
"includePath": [ "includePath": [
// "${workspaceFolder}/**",
"C:/ProgramData/mingw64/mingw64/include", "C:/ProgramData/mingw64/mingw64/include",
"C:/ProgramData/mingw64/mingw64/x86_64-w64-mingw32/include" "C:/ProgramData/mingw64/mingw64/x86_64-w64-mingw32/include"
], ],
"defines": [], "defines": [],
"compilerPath": "gcc", "compilerPath": "gcc",
"intelliSenseMode": "windows-gcc-x64", "intelliSenseMode": "windows-gcc-x64",
"cStandard": "c99", "cStandard": "c89",
"cppStandard": "c++17" "cppStandard": "c++17"
// "browse": {
// "limitSymbolsToIncludedHeaders": true
// }
} }
], ],
"version": 4 "version": 4

3
.vscode/tasks.json vendored
View File

@ -2,10 +2,11 @@
"tasks": [ "tasks": [
{ {
"type": "cppbuild", "type": "cppbuild",
"label": "C/C++: gcc 生成活动文件", "label": "C/C++: gcc 编译-c89",
"command": "gcc", "command": "gcc",
"args": [ "args": [
"-fdiagnostics-color=always", "-fdiagnostics-color=always",
"-std=c89",
"-g", "-g",
"${file}", "${file}",
"-o", "-o",