According to the error message, what’s missing here is adding the SDL2 include dir itself to the search path, like -I ~/Downloads/SDL2-2.30.3/i686-w64-mingw32/include/SDL2
If linker errors turn up afte fixing this, they may be due to missing libSDL2main, which is part of the download so -lSDL2main
should generally work, but see also [SDL2.x] WinMain vs. main - #5 by Daniel_Gibson for the correct order of linking SDL2 and SDL2main with MinGW