SDL2 fails to compile, VSCode/Mingw32

Hello,
I have searched feasibly everything before coming to the forum. I don’t know what I’m doing wrong.
I’m running windows 10 22H2, I’m editing using VSCode, and compiling with mingw32.

I have a simple C program that creates a window filled in with blue, and then destroys the window, and returns 0. When I run gcc, it returns with:

src/lib/libSDL2main.a(SDL_windows_main.o): In function `main_getcmdline':
/Users/valve/release/SDL2/SDL2-2.28.2-source/foo-x86/../src/main/windows/SDL_windows_main.c:80: undefined reference to `SDL_main'
collect2.exe: error: ld returned 1 exit status

The compiler and the editor recognize references to SDL functions, but when I compile I get this error. My path variables are correct, my makefile command is correct, and standard libraries function so I know it is an SDL specific problem. I uninstalled compiler, editor, and libraries and followed multiple different installation tutorials. If you want to see my source code, I will share it.

I can’t really get started with SDL if I’m having these compiler errors. Thank you guys in advance.

https://wiki.libsdl.org/SDL2/FAQWindows#i_get_undefined_reference_to_sdl_main_…