g++ filename.c -o output -lmingw32 -lSDL2main -lSDL2_test -lSDL2 关键是后面4 个选项顺序不能乱 转载于:https://www.cnblogs.com/onestow/p/4549284.html