@stungeye yes, in sdl1 and sdl2 linking to sdl2main is required, though it's generally provided as a static library (sdl2main.a), most compilers should auto resolve the correct file to use with the linker settings -lSDL2 and -lSDL2main.
SDL actually provides a tool, sdl2-config you can execute with "sdl2-config --libs" and "sdl2-config --cflags" to get the correct settings for your system, most ide's/compilers can use this directly but iirc visual studio you have to copy the output.