Why this error?
I'm trying to build with a JSON file in VS Code. Here is the JSON: { // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "echo", "type": "shell", "command": "g++", "args": [ "-o", "C:\\MinGW\\bin\\pointer.cpp", "C:\\MinGW\\bin\\SDL2main.lib" ], "group": { "kind": "build", "isDefault": true } }, { "label": "echo", "type": "shell", "command": "g++", "args": [ "-o", "C:\\MinGW\\bin\\pointer.cpp", "C:\\MinGW\\bin\\SDL2.lib" ], "group": { "kind": "build", "isDefault": true }, "problemMatcher": [ "$gcc" ] }, { "label": "echo", "type": "shell", "command": "g++", "args": [ "-o", "C:\\MinGW\\bin\\pointer.cpp", "C:\\cpp\\pointer.o" ], "problemMatcher": [ "$gcc" ] } ] } It produces this error: c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libmingw32.a(main.o):(.text.startup+0xa0): undefined reference to `WinMain@16' collect2.exe: error: ld returned 1 exit status The terminal process terminated with exit code: 1 I know this seems really complicated but if anyone out there knows why this is going wrong, please help. Thank you.