I’m experimenting with SDL 1.2.15 for educational and retro development purposes. I’d like to compile my C programs using GCC (MinGW) on Windows 10, but I haven’t found a clear explanation of how to do it.
I noticed that older Linux setups use the sdl-config tool to provide compiler and linker flags, but it doesn’t seem to exist on Windows.
Could anyone show me how to manually set up the GCC compile command for SDL 1.2.15, including which include paths and libraries I should use?
My goal is mainly to learn how older SDL setups worked, and to build small retro-style programs that could run even on older Windows versions (like 98/XP).
The tutorial series has more walkthroughs if you are using an IDE like CODE::Blocks, Eclipse, or Windows Visual Express, and for different operating systems.
Here’s the root page for the SDL 1 tutorials, they are likely to be helpful if you aren’t familiar with coding in SDL_1.x.x.
Do you already have the SDL 1.2.15 DLL libraries downloaded/available, or do you need help compiling them from the github source code? I’m surprised to learn that the SDL website and SDL github both have taken down their binary builds of the original versions.
Please do not download the library builds from unofficial sources, today I would only suggest you build SDL1 directly from the github source files, or perhaps you have a CD from an old text-book.
Edit: Most Operating Systems have package managers now, a generally safe source if available. I don’t know how reverse-compatible a Windows 10-11 build might be for 98-XP-Vista
Thank you for helping me! With a bit of research I learned that I could use MSYS2 MINGW64 to compile SDL programs. And I learned to compile a program that shows a window!
I’ll often post on discourse and tell you guys about my project.