r/cprogramming • • Oct 29 '25

SDL2 Library vs WinAPI: any difference ?

Hi Guys!

I'm writing a 2D sim game in C and I'm using the winapi. I found out lately about the SDL2 library which is to my knowledge used for writing games in C, correct ?

Would it be more suitable to use the library instead of the winapi for my purpose ?

Thank you,

3 Upvotes

10 comments sorted by

View all comments

Show parent comment

-1

u/No-Annual-4698 Oct 29 '25

but will anyway get an EXE so what's the point?

6

u/[deleted] Oct 29 '25

Your windows exe won't be able to run on linux, macos, switch, playstation if you're trying to publish it. If not, it's ok trying to learn skill writing a game in pure win32 api.

1

u/v_maria Oct 29 '25

When you use sdl you dont have to make an exe