I'm compiling using Notepad++ and NPPExec on Windows, the following script works for me, it compiles SDL without any console window being displayed: The key option is -mwindows
NPP_SAVE CD $(CURRENT_DIRECTORY) cmd /c C:\MinGW\bin\gcc.exe -mwindows "$(FILE_NAME)" -I"C:mingw\include" -L "C:\mingw\lib" -lmingw32 -lSDL2main -lSDL2 -lSDL2 -llibSDL2_image -o "$(NAME_PART)".exe
cmd /k "$(NAME_PART)"