MinGW, always linking with pthreads
Reinstallation of SDL2 avoiding binary conflict between SDL files and SDL2 files will resolve the immediate problem.
To solve the new problem would need to go the SDL2 distribution file (the one copied to MinGW) and copy the SDL2.dll from it [DLL from distributable][1]--- by dragging the file over your debug and/or release folders where the .exe file lives.(.exe + dll -> right?) moving dll to exes. Build/Run the program it should work! You should see a Welcome message! https://www.caveofprogramming.com/c-for-complete-beginners/setting-up-sdl-windows.html