C compile SDL program using mingw

Download and install MinGW from the official website.

Download the SDL development library for MinGW.

Extract the SDL library to a location on your computer.

Open a command prompt and navigate to the directory where your C++ source code and SDL library are located.

Compile your C++ program using the following command: g++ -o output.exe input.cpp -I SDL2-2.0.4\x86_64-w64-mingw32\include\SDL2 -L SDL2-2.0.4\x86_64-w64-mingw32\lib -lmingw32 -lSDL2main -lSDL2

Run the compiled program using: ./output.exe