Can't compile SDL2_gfx with mingw on Windows

Hi.

I’m new to SDL but have managed to get a working mingw environment running under Windows 10 from the command line by following lazyfoo’s tutorial and have gotten as far as rendering tilemaps to the screen.

I’d like to use SDL2_gfx but am having trouble compiling it. There’s no makefile, and I don’t know anything about automake or its friends.

I’ve exhausted google on the subject and was hoping somebody could point me in the right direction. I don’t want to use CodeBlocks or Visual Studio if possible.

Many thanks…

Andy

A Windows user that doesn’t want to use an IDE? That’s a first for me. :wink:

In the latest version I found on Sourceforge, the path: Other Builds\mingw.zip\mingw\ has what appears to be a Makefile in it, does that not work?

Hi Blerg.

Thanks for the response. I learnt C on the Amiga back in the 90s and although there were IDEs around they were expensive, so I stuck to the command line. This way I can see how the pieces fit together while I’m easing back in to it.

I think you’re looking at SDL_gfx-2.x, I tried that at first but found it didn’t work with SDL2, so ended up with SDL2_gfx-1.x.x.x which didn’t have the makefile. Smiles did help me out with the DLL/lib but by the time I got it working I realised I was barking up the wrong tree and probably don’t need any external things at all.

Many thanks…

Andy

Yep, my bad, I downloaded the wrong one seeing the 2.x on there. And I do agree with you that there are a lot of expensive IDEs out there. There’s also a boatload of free ones, and some are pretty decent. One of my favorites, and fallback is: Code::Blocks. Others are: Codelite, KDevelop, the forked Dev-C++, and in a pinch Notepad++, if you’re on Windows. Except for Notepad++, they’re all cross-platform too. I’ve only really used Code::Blocks, so I can’t really say much about the others. I’m testing out CLion, (also cross-platform) and right now it’s kinda buggy, but that’s because I’m on the beta… I hope. IDEs just have too many conveniences for me to not at least recommend something. They all have little annoying quirks, but they’re well worth it, except for Visual Studio, I avoid that like the plague that it is. CLion is kind of annoying too, it requires knowledge of CMake for its project files; but they’re moving away from that thankfully.

Hi Blerg.

I’ve tried Visual Studio and Code::Blocks and found them way too complicated for my needs.

I’m happy as a clam with Sublime Text and a console window for compiling.

For now my projects are really simple but at some point it would be nice to have a debugger so will have to think about more tools. I’ll also read up on Cmake as it seems to be popping up a lot.

Many thanks…

Andy