Skip to content
Sign upLog in
← Back to Community

is there a way to use SDL in c?

Profile icon
meijeronfire

I would like to use SDL in c, but I have no idea how I would go about it. Do you have any idea?

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
Margazor
Profile icon
meijeronfire
Comments
hotnewtop
Profile icon
Coder100
Profile icon
meijeronfire

@Coder100
Wow! I expected I had to do way more than that, but it works! thanks a lot.

Profile icon
Coder100

np!

@meijeronfire

Profile icon
WasiHusain

@Coder100

I forked the Repl and ran it, it worked. But when I typed the same after creating a new repl, it showed the error : "fatal error: SDL2/SDL.h: No such file or directory".

Profile icon
Coder100
#include <sdl2/sdl2.h>

iirc

Profile icon
RYANTADIPARTHI

Here's a link that tells. Just look at the c part.

https://www.geeksforgeeks.org/sdl-library-in-c-c-with-examples/