SDL 2 Undefined Reference to “WinMain@16” and several SDL functions

I think you want

#define SDL_MAIN_HANDLED

in your main file, BEFORE the line

#include <SDL2/SDL.h>

from: https://stackoverflow.com/a/32343111/5214543

Leave a Comment