Skip to content

Commit 6b7cebe

Browse files
committed
samples(Fib): remove build task, update README, remove preLaunchTask from launch.json
1 parent 8aeeb69 commit 6b7cebe

File tree

3 files changed

+76
-45
lines changed

3 files changed

+76
-45
lines changed

Code Samples/Fib/.vscode/launch.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"configurations": [
44
{
55
"name": "(gdb) Launch",
6-
"preLaunchTask": "build",
76
"type": "cppdbg",
87
"request": "launch",
98
"args": [],
Lines changed: 28 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,34 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": []
4+
}
5+
```jsonc
6+
{
7+
"version": "2.0.0",
8+
"tasks": []
9+
}
10+
```
11+
{
12+
// See https://go.microsoft.com/fwlink/?LinkId=733558
13+
// for the documentation about the tasks.json format
14+
"version": "2.0.0",
15+
// The explicit "build" task was removed because the sample now uses a direct g++ command
16+
// (the Makefile was removed). If you prefer a build task, add one that runs the
17+
// appropriate g++ command for your platform or call `build.cmd` on Windows.
18+
"tasks": []
19+
}
120
{
221
// See https://go.microsoft.com/fwlink/?LinkId=733558
322
// for the documentation about the tasks.json format
423
"version": "2.0.0",
5-
"tasks": [
6-
{
7-
"label": "build",
8-
"type": "shell",
9-
"group": {
10-
"kind": "build",
11-
"isDefault": true
12-
},
13-
"presentation": {
24+
{
25+
// See https://go.microsoft.com/fwlink/?LinkId=733558
26+
// for the documentation about the tasks.json format
27+
"version": "2.0.0",
28+
// The explicit "build" task was removed because the sample now uses a direct g++ command
29+
// (the Makefile was removed). If you prefer a build task, add one that runs the
30+
// appropriate g++ command for your platform or call `build.cmd` on Windows.
31+
"tasks": []
32+
}
1433
"echo": true,
15-
"reveal": "always",
16-
"focus": false,
17-
"panel": "shared"
18-
},
19-
"windows": {
20-
"command": "${workspaceRoot}/build.cmd",
21-
"args": [
22-
"<Path/To/MinGW/Cygwin/Bin/Folder>", // Path to the bin folder containing g++ to compile
23-
"fib.exe" // Output executable name
24-
]
25-
},
26-
"linux": {
27-
"command": "g++",
28-
"args": [
29-
"-g",
30-
"*.cpp",
31-
"-lpthread",
32-
"--std=c++11",
33-
"-o",
34-
"fib.out"
35-
]
36-
},
37-
"osx": {
38-
"command": "g++",
39-
"args": [
40-
"-g",
41-
"*.cpp",
42-
"-lpthread",
43-
"--std=c++11",
44-
"-o",
45-
"fib.out"
46-
]
47-
}
48-
}
49-
]
5034
}

Code Samples/Fib/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,51 @@
11
# Fib
22

3+
This code sample is to show debugging. Update `launch.json` and `tasks.json` in the `.vscode` folder to use your setup to build and debug.
4+
5+
## Building
6+
7+
Use one of the commands below to build the sample. The Makefile was removed and the sample is built with g++ directly.
8+
9+
```bash
10+
# Linux / macOS
11+
g++ -g *.cpp -std=c++11 -o fib.out
12+
13+
# Windows (MinGW)
14+
g++ -g *.cpp -std=c++11 -o fib.exe
15+
```
16+
17+
On Windows you can also run the included `build.cmd` if you prefer (it expects the path to a MinGW/Cygwin `bin` folder and an output name):
18+
19+
```powershell
20+
.\build.cmd <Path\To\MinGW\Bin> fib.exe
21+
```
22+
23+
After building, use the `launch.json` in this folder (or your own) to debug the produced binary.
24+
```markdown
25+
# Fib
26+
27+
This code sample is to show debugging. Update `launch.json` and `tasks.json` in the `.vscode` folder to use your setup to build and debug.
28+
29+
## Building
30+
31+
Use one of the commands below to build the sample. The Makefile was removed and the sample is built with g++ directly.
32+
33+
```bash
34+
# Linux / macOS
35+
g++ -g *.cpp -std=c++11 -o fib.out
36+
37+
# Windows (MinGW)
38+
g++ -g *.cpp -std=c++11 -o fib.exe
39+
```
40+
41+
On Windows you can also run the included `build.cmd` if you prefer (it expects the path to a MinGW/Cygwin `bin` folder and an output name):
42+
43+
```powershell
44+
.\build.cmd <Path\To\MinGW\Bin> fib.exe
45+
```
46+
47+
After building, use the `launch.json` in this folder (or your own) to debug the produced binary.
48+
```
49+
# Fib
50+
351
This code sample is to show debugging. Update `launch.json` and `tasks.json` in the `.vscode` folder to use your setup to build and debug.

0 commit comments

Comments
 (0)