質問編集履歴
3
task.jsonを修正したものを載せました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -186,7 +186,7 @@
|
|
186
186
|
|
187
187
|
|
188
188
|
|
189
|
-
task.json
|
189
|
+
task.json(修正前)
|
190
190
|
|
191
191
|
```
|
192
192
|
|
@@ -332,6 +332,146 @@
|
|
332
332
|
|
333
333
|
|
334
334
|
|
335
|
+
task.json(修正後)
|
336
|
+
|
337
|
+
```
|
338
|
+
|
339
|
+
{
|
340
|
+
|
341
|
+
"tasks": [
|
342
|
+
|
343
|
+
{
|
344
|
+
|
345
|
+
"type": "cppbuild",
|
346
|
+
|
347
|
+
"label": "C/C++: g++.exe アクティブなファイルのビルド",
|
348
|
+
|
349
|
+
"command": "C:\MinGW\bin\g++.exe",
|
350
|
+
|
351
|
+
"args": [
|
352
|
+
|
353
|
+
"-fdiagnostics-color=always",
|
354
|
+
|
355
|
+
"-g",
|
356
|
+
|
357
|
+
"${file}",
|
358
|
+
|
359
|
+
"-o",
|
360
|
+
|
361
|
+
"${fileDirname}\${fileBasenameNoExtension}.exe"
|
362
|
+
|
363
|
+
],
|
364
|
+
|
365
|
+
"options": {
|
366
|
+
|
367
|
+
"cwd": "${fileDirname}"
|
368
|
+
|
369
|
+
},
|
370
|
+
|
371
|
+
"problemMatcher": [
|
372
|
+
|
373
|
+
"$g++"
|
374
|
+
|
375
|
+
],
|
376
|
+
|
377
|
+
"group": "build",
|
378
|
+
|
379
|
+
"detail": "デバッガーによって生成されたタスク。"
|
380
|
+
|
381
|
+
},/*
|
382
|
+
|
383
|
+
{
|
384
|
+
|
385
|
+
"type": "cppbuild",
|
386
|
+
|
387
|
+
"label": "C/C++: g++.exe アクティブなファイルのビルド",
|
388
|
+
|
389
|
+
"command": "C:/MinGW/bin/g++.exe",
|
390
|
+
|
391
|
+
"args": [
|
392
|
+
|
393
|
+
"-fdiagnostics-color=always",
|
394
|
+
|
395
|
+
"-g",
|
396
|
+
|
397
|
+
"${file}",
|
398
|
+
|
399
|
+
"-o",
|
400
|
+
|
401
|
+
"${fileDirname}\${fileBasenameNoExtension}.exe"
|
402
|
+
|
403
|
+
],
|
404
|
+
|
405
|
+
"problemMatcher": [
|
406
|
+
|
407
|
+
"$g++"
|
408
|
+
|
409
|
+
],
|
410
|
+
|
411
|
+
"group": {
|
412
|
+
|
413
|
+
"kind": "build",
|
414
|
+
|
415
|
+
"isDefault": true
|
416
|
+
|
417
|
+
},
|
418
|
+
|
419
|
+
"detail": "デバッガーによって生成されたタスク。"
|
420
|
+
|
421
|
+
},*/
|
422
|
+
|
423
|
+
{
|
424
|
+
|
425
|
+
"type": "cppbuild",
|
426
|
+
|
427
|
+
"label": "C/C++: cl.exe アクティブなファイルのビルド",
|
428
|
+
|
429
|
+
"command": "cl.exe",
|
430
|
+
|
431
|
+
"args": [
|
432
|
+
|
433
|
+
"/Zi",
|
434
|
+
|
435
|
+
"/EHsc",
|
436
|
+
|
437
|
+
"/nologo",
|
438
|
+
|
439
|
+
"/Fe:",
|
440
|
+
|
441
|
+
"${fileDirname}\${fileBasenameNoExtension}.exe",
|
442
|
+
|
443
|
+
"${file}"
|
444
|
+
|
445
|
+
],
|
446
|
+
|
447
|
+
"options": {
|
448
|
+
|
449
|
+
"cwd": "${fileDirname}"
|
450
|
+
|
451
|
+
},
|
452
|
+
|
453
|
+
"problemMatcher": [
|
454
|
+
|
455
|
+
"$msCompile"
|
456
|
+
|
457
|
+
],
|
458
|
+
|
459
|
+
"group": "build",
|
460
|
+
|
461
|
+
"detail": "コンパイラ: cl.exe"
|
462
|
+
|
463
|
+
}
|
464
|
+
|
465
|
+
],
|
466
|
+
|
467
|
+
"version": "2.0.0"
|
468
|
+
|
469
|
+
}
|
470
|
+
|
471
|
+
```
|
472
|
+
|
473
|
+
|
474
|
+
|
335
475
|
launch.json
|
336
476
|
|
337
477
|
```
|
2
c_cpp_properties.json を追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -396,6 +396,60 @@
|
|
396
396
|
|
397
397
|
```
|
398
398
|
|
399
|
+
|
400
|
+
|
401
|
+
c_cpp_properties.json
|
402
|
+
|
403
|
+
```
|
404
|
+
|
405
|
+
{
|
406
|
+
|
407
|
+
"configurations": [
|
408
|
+
|
409
|
+
{
|
410
|
+
|
411
|
+
"name": "Win32",
|
412
|
+
|
413
|
+
"includePath": [
|
414
|
+
|
415
|
+
"${workspaceFolder}/**",
|
416
|
+
|
417
|
+
"C:/Program Files (x86)/Microsoft Visual Studio/include/**"
|
418
|
+
|
419
|
+
],
|
420
|
+
|
421
|
+
"defines": [
|
422
|
+
|
423
|
+
"_DEBUG",
|
424
|
+
|
425
|
+
"UNICODE",
|
426
|
+
|
427
|
+
"_UNICODE"
|
428
|
+
|
429
|
+
],
|
430
|
+
|
431
|
+
"windowsSdkVersion": "10.0.18362.0",
|
432
|
+
|
433
|
+
"compilerPath": "C:/MinGW/bin/g++.exe",
|
434
|
+
|
435
|
+
"cStandard": "c17",
|
436
|
+
|
437
|
+
"cppStandard": "c++17",
|
438
|
+
|
439
|
+
"intelliSenseMode": "gcc-x64"
|
440
|
+
|
441
|
+
}
|
442
|
+
|
443
|
+
],
|
444
|
+
|
445
|
+
"version": 4
|
446
|
+
|
447
|
+
}
|
448
|
+
|
449
|
+
```
|
450
|
+
|
451
|
+
|
452
|
+
|
399
453
|
### 試したこと
|
400
454
|
|
401
455
|
|
1
task.json launch.json を追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
```
|
34
34
|
|
35
|
-
C:/MinGW/bin/gcc.exe -fdiagnostics-color=always -g C:\Users\user\Desktop\hogehoge\hoge.cpp -o C:\Users\user\Desktop\
|
35
|
+
C:/MinGW/bin/gcc.exe -fdiagnostics-color=always -g C:\Users\user\Desktop\hogehoge\hoge.cpp -o C:\Users\user\Desktop\hogehoge\hoge.exe
|
36
36
|
|
37
37
|
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\user\AppData\Local\Temp\ccHViWy7.o: in function `main':
|
38
38
|
|
@@ -184,6 +184,218 @@
|
|
184
184
|
|
185
185
|
```
|
186
186
|
|
187
|
+
|
188
|
+
|
189
|
+
task.json
|
190
|
+
|
191
|
+
```
|
192
|
+
|
193
|
+
{
|
194
|
+
|
195
|
+
"tasks": [
|
196
|
+
|
197
|
+
{
|
198
|
+
|
199
|
+
"type": "cppbuild",
|
200
|
+
|
201
|
+
"label": "C/C++: g++.exe アクティブなファイルのビルド",
|
202
|
+
|
203
|
+
"command": "C:\MinGW\bin\g++.exe",
|
204
|
+
|
205
|
+
"args": [
|
206
|
+
|
207
|
+
"-fdiagnostics-color=always",
|
208
|
+
|
209
|
+
"-g",
|
210
|
+
|
211
|
+
"${file}",
|
212
|
+
|
213
|
+
"-o",
|
214
|
+
|
215
|
+
"${fileDirname}\${fileBasenameNoExtension}.exe"
|
216
|
+
|
217
|
+
],
|
218
|
+
|
219
|
+
"options": {
|
220
|
+
|
221
|
+
"cwd": "${fileDirname}"
|
222
|
+
|
223
|
+
},
|
224
|
+
|
225
|
+
"problemMatcher": [
|
226
|
+
|
227
|
+
"$g++"
|
228
|
+
|
229
|
+
],
|
230
|
+
|
231
|
+
"group": "build",
|
232
|
+
|
233
|
+
"detail": "デバッガーによって生成されたタスク。"
|
234
|
+
|
235
|
+
},
|
236
|
+
|
237
|
+
{
|
238
|
+
|
239
|
+
"type": "cppbuild",
|
240
|
+
|
241
|
+
"label": "C/C++: g++.exe アクティブなファイルのビルド",
|
242
|
+
|
243
|
+
"command": "C:/MinGW/bin/g++.exe",
|
244
|
+
|
245
|
+
"args": [
|
246
|
+
|
247
|
+
"-fdiagnostics-color=always",
|
248
|
+
|
249
|
+
"-g",
|
250
|
+
|
251
|
+
"${file}",
|
252
|
+
|
253
|
+
"-o",
|
254
|
+
|
255
|
+
"${fileDirname}\${fileBasenameNoExtension}.exe"
|
256
|
+
|
257
|
+
],
|
258
|
+
|
259
|
+
"options": {
|
260
|
+
|
261
|
+
"cwd": "C:/MinGW/bin"
|
262
|
+
|
263
|
+
},
|
264
|
+
|
265
|
+
"problemMatcher": [
|
266
|
+
|
267
|
+
"$g++"
|
268
|
+
|
269
|
+
],
|
270
|
+
|
271
|
+
"group": {
|
272
|
+
|
273
|
+
"kind": "build",
|
274
|
+
|
275
|
+
"isDefault": true
|
276
|
+
|
277
|
+
},
|
278
|
+
|
279
|
+
"detail": "デバッガーによって生成されたタスク。"
|
280
|
+
|
281
|
+
},
|
282
|
+
|
283
|
+
{
|
284
|
+
|
285
|
+
"type": "cppbuild",
|
286
|
+
|
287
|
+
"label": "C/C++: cl.exe アクティブなファイルのビルド",
|
288
|
+
|
289
|
+
"command": "cl.exe",
|
290
|
+
|
291
|
+
"args": [
|
292
|
+
|
293
|
+
"/Zi",
|
294
|
+
|
295
|
+
"/EHsc",
|
296
|
+
|
297
|
+
"/nologo",
|
298
|
+
|
299
|
+
"/Fe:",
|
300
|
+
|
301
|
+
"${fileDirname}\${fileBasenameNoExtension}.exe",
|
302
|
+
|
303
|
+
"${file}"
|
304
|
+
|
305
|
+
],
|
306
|
+
|
307
|
+
"options": {
|
308
|
+
|
309
|
+
"cwd": "${fileDirname}"
|
310
|
+
|
311
|
+
},
|
312
|
+
|
313
|
+
"problemMatcher": [
|
314
|
+
|
315
|
+
"$msCompile"
|
316
|
+
|
317
|
+
],
|
318
|
+
|
319
|
+
"group": "build",
|
320
|
+
|
321
|
+
"detail": "コンパイラ: cl.exe"
|
322
|
+
|
323
|
+
}
|
324
|
+
|
325
|
+
],
|
326
|
+
|
327
|
+
"version": "2.0.0"
|
328
|
+
|
329
|
+
}
|
330
|
+
|
331
|
+
```
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
launch.json
|
336
|
+
|
337
|
+
```
|
338
|
+
|
339
|
+
{
|
340
|
+
|
341
|
+
// IntelliSense を使用して利用可能な属性を学べます。
|
342
|
+
|
343
|
+
// 既存の属性の説明をホバーして表示します。
|
344
|
+
|
345
|
+
// 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387
|
346
|
+
|
347
|
+
"version": "0.2.0",
|
348
|
+
|
349
|
+
"configurations": [
|
350
|
+
|
351
|
+
{
|
352
|
+
|
353
|
+
"name": "gcc.exe - アクティブ ファイルのビルドとデバッグ",
|
354
|
+
|
355
|
+
"type": "cppdbg",
|
356
|
+
|
357
|
+
"request": "launch",
|
358
|
+
|
359
|
+
"program": "${fileDirname}/${fileBasenameNoExtension}.exe",
|
360
|
+
|
361
|
+
"args": [],
|
362
|
+
|
363
|
+
"stopAtEntry": false,
|
364
|
+
|
365
|
+
"cwd": "${workspaceFolder}",
|
366
|
+
|
367
|
+
"environment": [],
|
368
|
+
|
369
|
+
"externalConsole": true,
|
370
|
+
|
371
|
+
"MIMode": "gdb",
|
372
|
+
|
373
|
+
"miDebuggerPath": "C:/MinGW/bin/gdb.exe",
|
374
|
+
|
375
|
+
"setupCommands": [
|
376
|
+
|
377
|
+
{
|
378
|
+
|
379
|
+
"description": "Enable pretty-printing for gdb",
|
380
|
+
|
381
|
+
"text": "-enable-pretty-printing",
|
382
|
+
|
383
|
+
"ignoreFailures": true
|
384
|
+
|
385
|
+
}
|
386
|
+
|
387
|
+
],
|
388
|
+
|
389
|
+
"preLaunchTask": "C/C++: gcc.exe アクティブなファイルのビルド"
|
390
|
+
|
391
|
+
}
|
392
|
+
|
393
|
+
]
|
394
|
+
|
395
|
+
}
|
396
|
+
|
397
|
+
```
|
398
|
+
|
187
399
|
### 試したこと
|
188
400
|
|
189
401
|
|