Skip to content

Commit f7ae64f

Browse files
committed
adapt to linux
1 parent 73286f5 commit f7ae64f

17 files changed

+186
-110
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
*.exe
22
*.o
33
*.dev
4-
*.layout
4+
*.layout

.vscode.bak1/c_cpp_properties.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"UNICODE",
1111
"_UNICODE"
1212
],
13-
"compilerPath": "C:\\msys64\\ucrt64\\bin\\g++.exe",
13+
"compilerPath": "C:\\msys64\\ucrt64\\bin\\g++",
1414
"cStandard": "c17",
1515
"cppStandard": "gnu++17",
1616
"intelliSenseMode": "windows-gcc-x64"

.vscode.bak1/launch.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// "console": "integratedTerminal"
1111
// },
1212
{
13-
"name": "C/C++: g++.exe build and debug the C++ language files",
13+
"name": "C/C++: g++ build and debug the C++ language files",
1414
"type": "cppdbg",
1515
"request": "launch",
1616
// "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
@@ -34,11 +34,11 @@
3434
"ignoreFailures": true
3535
}
3636
],
37-
// "preLaunchTask": "C/C++: g++.exe build active file"
37+
// "preLaunchTask": "C/C++: g++ build active file"
3838
"preLaunchTask": "task1"
3939
},
4040
{
41-
"name": "C/C++: g++.exe build and debug the C language files",
41+
"name": "C/C++: g++ build and debug the C language files",
4242
"type": "cppdbg",
4343
"request": "launch",
4444
"program": "${fileDirname}\\All.exe",
@@ -64,7 +64,7 @@
6464
"preLaunchTask": "task1c"
6565
},
6666
{
67-
"name": "C/C++: g++.exe build and debug active file(For English, Chinese characters and other non-English characters)",
67+
"name": "C/C++: g++ build and debug active file(For English, Chinese characters and other non-English characters)",
6868
"type": "cppdbg",
6969
"request": "launch",
7070
// "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
@@ -91,7 +91,7 @@
9191
"preLaunchTask": "task2"
9292
},
9393
{
94-
"name": "C/C++: g++.exe build and debug active file",
94+
"name": "C/C++: g++ build and debug active file",
9595
"type": "cppdbg",
9696
"request": "launch",
9797
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",

.vscode.bak1/tasks.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"type": "cppbuild",
55
"label": "task1",
6-
"command": "g++.exe",
6+
"command": "g++",
77
"args": [
88
"-fdiagnostics-color=always",
99
"-g",
@@ -28,7 +28,7 @@
2828
{
2929
"type": "cppbuild",
3030
"label": "task1c",
31-
"command": "g++.exe",
31+
"command": "g++",
3232
"args": [
3333
"-fdiagnostics-color=always",
3434
"-g",
@@ -48,7 +48,7 @@
4848
{
4949
"type": "cppbuild",
5050
"label": "task2",
51-
"command": "g++.exe",
51+
"command": "g++",
5252
"args": [
5353
"-fdiagnostics-color=always",
5454
"-g",
@@ -68,7 +68,7 @@
6868
{
6969
"type": "cppbuild",
7070
"label": "task3",
71-
"command": "g++.exe",
71+
"command": "g++",
7272
"args": [
7373
"-fdiagnostics-color=always",
7474
"-g",

.vscode.bak2/c_cpp_properties.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"UNICODE",
1111
"_UNICODE"
1212
],
13-
"compilerPath": "C:\\msys64\\ucrt64\\bin\\g++.exe",
13+
"compilerPath": "C:\\msys64\\ucrt64\\bin\\g++",
1414
"cStandard": "c17",
1515
"cppStandard": "gnu++17",
1616
"intelliSenseMode": "windows-gcc-x64"

.vscode.bak2/launch.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// "console": "integratedTerminal"
1111
// },
1212
{
13-
"name": "C/C++: g++.exe build and debug active file(Recommend for Starter)",
13+
"name": "C/C++: g++ build and debug active file(Recommend for Starter)",
1414
"type": "cppdbg",
1515
"request": "launch",
1616
// "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
@@ -37,7 +37,7 @@
3737
"preLaunchTask": "task2"
3838
},
3939
{
40-
"name": "C/C++: g++.exe build and debug active file external console",
40+
"name": "C/C++: g++ build and debug active file external console",
4141
"type": "cppdbg",
4242
"request": "launch",
4343
// "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
@@ -68,7 +68,7 @@
6868
"preLaunchTask": "task externalConsole"
6969
},
7070
{
71-
"name": "C/C++: g++.exe build and debug the C++ language files",
71+
"name": "C/C++: g++ build and debug the C++ language files",
7272
"type": "cppdbg",
7373
"request": "launch",
7474
// "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
@@ -93,11 +93,11 @@
9393
"ignoreFailures": true
9494
}
9595
],
96-
// "preLaunchTask": "C/C++: g++.exe build active file"
96+
// "preLaunchTask": "C/C++: g++ build active file"
9797
"preLaunchTask": "task1"
9898
},
9999
{
100-
"name": "C/C++: g++.exe build and debug the C language files",
100+
"name": "C/C++: g++ build and debug the C language files",
101101
"type": "cppdbg",
102102
"request": "launch",
103103
"program": "${fileDirname}\\All.exe",
@@ -123,7 +123,7 @@
123123
"preLaunchTask": "task1c"
124124
},
125125
{
126-
"name": "C/C++: g++.exe build and debug active file(For English, Chinese characters and other non-English characters)",
126+
"name": "C/C++: g++ build and debug active file(For English, Chinese characters and other non-English characters)",
127127
"type": "cppdbg",
128128
"request": "launch",
129129
// "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
@@ -150,7 +150,7 @@
150150
"preLaunchTask": "task2"
151151
},
152152
{
153-
"name": "C/C++: g++.exe build and debug active file",
153+
"name": "C/C++: g++ build and debug active file",
154154
"type": "cppdbg",
155155
"request": "launch",
156156
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",

.vscode.bak2/tasks.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"type": "cppbuild",
55
"label": "task externalConsole",
6-
"command": "g++.exe",
6+
"command": "g++",
77
"args": [
88
"-fdiagnostics-color=always",
99
"-g",
@@ -28,7 +28,7 @@
2828
{
2929
"type": "cppbuild",
3030
"label": "task1",
31-
"command": "g++.exe",
31+
"command": "g++",
3232
"args": [
3333
"-fdiagnostics-color=always",
3434
"-g",
@@ -53,7 +53,7 @@
5353
{
5454
"type": "cppbuild",
5555
"label": "task1c",
56-
"command": "g++.exe",
56+
"command": "g++",
5757
"args": [
5858
"-fdiagnostics-color=always",
5959
"-g",
@@ -73,7 +73,7 @@
7373
{
7474
"type": "cppbuild",
7575
"label": "task2",
76-
"command": "g++.exe",
76+
"command": "g++",
7777
"args": [
7878
"-fdiagnostics-color=always",
7979
"-g",
@@ -95,7 +95,7 @@
9595
{
9696
"type": "cppbuild",
9797
"label": "task3",
98-
"command": "g++.exe",
98+
"command": "g++",
9999
"args": [
100100
"-fdiagnostics-color=always",
101101
"-g",

.vscode/c_cpp_properties.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"UNICODE",
1111
"_UNICODE"
1212
],
13-
"compilerPath": "C:\\msys64\\ucrt64\\bin\\g++.exe",
13+
// "compilerPath": "g++",
1414
"cStandard": "c17",
1515
"cppStandard": "gnu++17",
1616
"intelliSenseMode": "windows-gcc-x64"

.vscode/launch.json

+37-25
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
// "console": "integratedTerminal"
1111
// },
1212
{
13-
"name": "C/C++: g++.exe build and debug active file(Recommend for C++(by The way C) Starter)",
13+
"name": "C/C++: g++ build and debug active file(Recommend for C++(by The way C) Starter)",
1414
"type": "cppdbg",
1515
"request": "launch",
16-
// "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
17-
// "program": "${fileDirname}\\a.exe",
18-
"program": "${workspaceFolder}\\a.exe",
16+
// "program": "${fileDirname}/${fileBasenameNoExtension}.exe",
17+
// "program": "${fileDirname}/a.exe",
18+
"program": "${workspaceFolder}/a.exe",
1919
"args": [],
2020
"stopAtEntry": false,
21-
"cwd": "${workspaceFolder}",//注意和对应的task配合
21+
"cwd": "${workspaceFolder}", //注意和对应的task配合
2222
"environment": [],
2323
"externalConsole": false,
2424
"MIMode": "gdb",
@@ -38,11 +38,11 @@
3838
"preLaunchTask": "task2"
3939
},
4040
{
41-
"name": "C/C++: gcc.exe build and debug active file(Recommend for C(by The way c++) Starter)",
41+
"name": "C/C++: gcc build and debug active file(Recommend for C(by The way c++) Starter)",
4242
"type": "cppdbg",
4343
"request": "launch",
44-
// "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
45-
"program": "${fileDirname}\\a.exe",
44+
// "program": "${fileDirname}/${fileBasenameNoExtension}.exe",
45+
"program": "${fileDirname}/a.exe",
4646
"args": [],
4747
"stopAtEntry": false,
4848
"cwd": "${fileDirname}",
@@ -65,11 +65,11 @@
6565
"preLaunchTask": "task2c"
6666
},
6767
{
68-
"name": "C/C++: g++.exe build and debug active file external console",
68+
"name": "C/C++: g++ build and debug active file external console",
6969
"type": "cppdbg",
7070
"request": "launch",
71-
// "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
72-
"program": "${fileDirname}\\a.exe",
71+
// "program": "${fileDirname}/${fileBasenameNoExtension}.exe",
72+
"program": "${fileDirname}/a.exe",
7373
"args": [],
7474
"stopAtEntry": false,
7575
"cwd": "${fileDirname}",
@@ -96,18 +96,18 @@
9696
"preLaunchTask": "task externalConsole"
9797
},
9898
{
99-
"name": "C/C++: g++.exe build and debug the C++ language files",
99+
"name": "C/C++: g++ build and debug the C++ language files",
100100
"type": "cppdbg",
101101
"request": "launch",
102-
// "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
103-
"program": "${fileDirname}\\All.exe",
102+
// "program": "${fileDirname}/${fileBasenameNoExtension}.exe",
103+
"program": "${fileDirname}/All.exe",
104104
"args": [],
105105
"stopAtEntry": false,
106106
"cwd": "${fileDirname}",
107107
"environment": [],
108108
"externalConsole": false,
109109
"MIMode": "gdb",
110-
// "miDebuggerPath": "${env:MSYS2_MINGW}\\gdb.exe",
110+
// "miDebuggerPath": "${env:MSYS2_MINGW}/gdb.exe",
111111
"miDebuggerPath": "gdb",
112112
"setupCommands": [
113113
{
@@ -121,14 +121,14 @@
121121
"ignoreFailures": true
122122
}
123123
],
124-
// "preLaunchTask": "C/C++: g++.exe build active file"
124+
// "preLaunchTask": "C/C++: g++ build active file"
125125
"preLaunchTask": "task1"
126126
},
127127
{
128-
"name": "C/C++: g++.exe build and debug the C language files",
128+
"name": "C/C++: g++ build and debug the C language files",
129129
"type": "cppdbg",
130130
"request": "launch",
131-
"program": "${fileDirname}\\All.exe",
131+
"program": "${fileDirname}/All.exe",
132132
"args": [],
133133
"stopAtEntry": false,
134134
"cwd": "${fileDirname}",
@@ -151,11 +151,11 @@
151151
"preLaunchTask": "task1c"
152152
},
153153
{
154-
"name": "C/C++: g++.exe build and debug active file(For English, Chinese characters and other non-English characters)",
154+
"name": "C/C++: g++ build and debug active file(For English, Chinese characters and other non-English characters)",
155155
"type": "cppdbg",
156156
"request": "launch",
157-
// "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
158-
"program": "${fileDirname}\\a.exe",
157+
// "program": "${fileDirname}/${fileBasenameNoExtension}.exe",
158+
"program": "${fileDirname}/a.exe",
159159
"args": [],
160160
"stopAtEntry": false,
161161
"cwd": "${fileDirname}",
@@ -178,10 +178,10 @@
178178
"preLaunchTask": "task2"
179179
},
180180
{
181-
"name": "C/C++: g++.exe build and debug active file",
181+
"name": "C/C++: g++ build and debug active file",
182182
"type": "cppdbg",
183183
"request": "launch",
184-
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
184+
"program": "${fileDirname}/${fileBasenameNoExtension}.exe",
185185
"args": [],
186186
"stopAtEntry": false,
187187
"cwd": "${fileDirname}",
@@ -204,15 +204,27 @@
204204
"preLaunchTask": "task3"
205205
},
206206
{
207-
"name": "C/C++: g++.exe build and run active file(no debug)", // 配置名称
207+
"name": "C/C++: gcc build and run active file(no debug)", // 配置名称
208208
"type": "cppdbg",
209209
"request": "launch",
210210
"program": "${workspaceFolder}/a.exe", // 指向编译生成的可执行文件
211211
"args": [], // 可选参数,传递给程序的命令行参数
212212
"cwd": "${workspaceFolder}", // 设置工作目录
213213
// "console": "integratedTerminal", // 在 VSCode 的集成终端中运行
214214
"stopAtEntry": false,
215-
"preLaunchTask": "build and run", // 指定预执行的编译任务名称
215+
"preLaunchTask": "build and run by gcc", // 指定预执行的编译任务名称
216+
"internalConsoleOptions": "neverOpen"
217+
},
218+
{
219+
"name": "C/C++: g++ build and run active file(no debug)", // 配置名称
220+
"type": "cppdbg",
221+
"request": "launch",
222+
"program": "${workspaceFolder}/a.exe", // 指向编译生成的可执行文件
223+
"args": [], // 可选参数,传递给程序的命令行参数
224+
"cwd": "${workspaceFolder}", // 设置工作目录
225+
// "console": "integratedTerminal", // 在 VSCode 的集成终端中运行
226+
"stopAtEntry": false,
227+
"preLaunchTask": "build and run by g++", // 指定预执行的编译任务名称
216228
"internalConsoleOptions": "neverOpen"
217229
}
218230
]

0 commit comments

Comments
 (0)