sdl configuration problem in vs code

im new to vs code, i have been using vs 2019 for so long but now I'm moving towards vscode, I know this question has been asked too many time but believe me I tried everything and nothing is working and now I'm loosing muy mind, plz can anyone help configuring vs code with me, thanks
btw the sdl do get recognized during coding but it only gives an error during compilation

properties.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**",
                "C:\\Users\\giberish\\Desktop\\V\\SDL's\\SDL2\\include",
                "C:\\Users\\giberish\\Desktop\\V\\SDL's\\SDL2_image-2.0.5\\include",
                "C:\\Users\\giberish\\Desktop\\V\\SDL's\\SDL2_mixer-2.0.4\\include",
                "C:\\Users\\giberish\\Desktop\\V\\SDL's\\SDL2_ttf-2.0.15\\include"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "C:\\Program Files\\MinGW\\bin\\gcc.exe",
            "cStandard": "gnu17",
            "cppStandard": "gnu++14",
            "intelliSenseMode": "windows-gcc-x86"
        }
    ],
    "version": 4
}


tasks.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "shell",
			"label": "SDL2",
			"command": "C:\\Program Files\\MinGW\\bin\\g++.exe",
			"args": [
				"-g",
				"${file}",
				"-o",
				"${workspaceFolder}\\${fileBasenameNoExtension}.exe",
				"-IC:\\Users\\giberish\\Desktop\\V\\SDL's\\SDL2\\include",
				"-LC:\\Users\\giberish\\Desktop\\V\\SDL's\\SDL2\\lib\\x86",
				"-w",
				"-W",
				"-lmingw32",
				"-lSDL2main",
				"-lSDL2",
				"-mwindows"
			],
			"options": {
				"cwd": "${workspaceFolder}"
			},
			"problemMatcher": [
				"$gcc"
			],
			"group": {
				"kind": "build",
				"isDefault": true
			}
		}
	]
}


settig.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
    "files.associations": {
        "array": "cpp",
        "atomic": "cpp",
        "*.tcc": "cpp",
        "cctype": "cpp",
        "clocale": "cpp",
        "cmath": "cpp",
        "cstdarg": "cpp",
        "cstddef": "cpp",
        "cstdint": "cpp",
        "cstdio": "cpp",
        "cstdlib": "cpp",
        "ctime": "cpp",
        "cwchar": "cpp",
        "cwctype": "cpp",
        "deque": "cpp",
        "unordered_map": "cpp",
        "vector": "cpp",
        "exception": "cpp",
        "algorithm": "cpp",
        "memory": "cpp",
        "memory_resource": "cpp",
        "optional": "cpp",
        "string": "cpp",
        "string_view": "cpp",
        "system_error": "cpp",
        "tuple": "cpp",
        "type_traits": "cpp",
        "utility": "cpp",
        "fstream": "cpp",
        "initializer_list": "cpp",
        "iosfwd": "cpp",
        "iostream": "cpp",
        "istream": "cpp",
        "limits": "cpp",
        "new": "cpp",
        "ostream": "cpp",
        "sstream": "cpp",
        "stdexcept": "cpp",
        "streambuf": "cpp",
        "cinttypes": "cpp",
        "typeinfo": "cpp"
    },
    "C_Cpp.errorSquiggles": "Disabled"
}


launch.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb)",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}\\${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "C:\\Program Files\\MinGW\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enably pretty printing",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "SDL2"
        }
    ]
}
Last edited on
Registered users can post here. Sign in or register to post.