How to install SDL 1.2 in Code::blocks

Hi everyone. I’ve got a problem in compiling an SDL project in Code::blocks. Here’s the screen capture.
Note: I’m on Windows 10 64-bit and I use Code::blocks 20.03 with SDL 1.2.15


I haven’t used SDL1 with Windows Code::Blocks in a loooong time.

Below is a little outdated, but should show you the way to setup SDL1 with Windows Code::Blocks:

Hope that helps…


@JeZxLee thanks but…
I tried 10 times, and failed.
I even used SDL 1.2.12 (like in
The error’s the same : ld.exe cannot find -lSDL , ld.exe cannot find -lSDLmain.
It’s been 5 days since i got stuck on that problem.
I give up.
I’ll learn SDL2 instead.
At least with it I build successfully my project.

Any idea of a good tutorial ?

Click below URL link to see our open-source SDL2 game project:

A fantastic one.
Hope i’ll be able to make a game as good as that.



Above game is 100% FOSS(Free Open Source Software).
Feel free to use anything in it for you own purpose.
(it’s 100% finished and does everything a 2D game needs to do)



This is because there is no library named -lSDL or -lSDLmain

Whatever compiler you’re using doesn’t understand the -l flag.

Better to learn SDL2 anyway, though.