Going absolutely insane trying to compile with SDL on Windows

Just to clarify: I’m not a programmer. I can’t parse the sort of shorthand people used to compiling and programming take entirely for granted. If I read something that tells me to link x to y, but doesn’t tell me where or how to do this, I’m completely lost. That being said, I had no problems compiling Cataclysm eight months ago, but I cannot compile it with tiles enabled to save my life.

I’ve tried MinGW and CodeBlocks, followed six or so sets of instructions including the (apparently) hopelessly outdated set on the wiki, and had no luck whatsoever. In one case I managed to compile it, but trying to run the binary returned an error telling me I didn’t have SDL.dll on my computer. Another time MinGW seemingly forgot I had installed the C++ compiler completely and wouldn’t do anything. More recently I’ve tried putting the WinDepend package in the directory with the Cataclysm source and compiling it with CodeBlocks using the Release -SDL -Localised build, and it can’t find libintl.h for some reason.

Can anyone please offer a simple, straightforward set of instructions for compiling this damned program? I desperately want to introduce my own changes into my game, but this task that ought to be basic enough is proving impossible for me.

If the wiki agents updated in the event this gets an answer that would be really nice. Sadly windows compilation methods often suffer because most of our devs are on Linux.

It’s virtually impossible to even figure out what specific files you’re supposed to be using. Between the forums and the wiki, there are a dozen different sets of instructions, many dating from halfway through 2013 that probably aren’t accurate anymore, and none of them work properly (for me, at least). People link to the SDL download site which is updated for SDL2, and I don’t think the SDL2 dlls will work for compiling Cataclysm. I would kill just to know what’s used in compiling the official binaries. I’m staggered at how much more confusing compiling the game has become in the space of half a year.

Actually if you are using the experimental version SDL2 is exactly what you want (since we updated just a week or two back).

That said if you are fine playing without tilesets you can always compile a curses version instead, no SDL files required at all (which is what I use on Cygwin, personally).

As for the official binaries I believe it uses a version of the clang compiler, but I’m not exactly sure, said versions are compiled by a build bot that I haven’t really had anything to do with.

I’m trying to compile 0.9, so I think it’s still using the original SDL.dll. But yes, I’ve done as you suggest and given up on using SDL entirely for now. I am interested in the new tilesets, but I’d rather be able to play around with the code.

Do you try compile with cygwin ?

Personally I have been using codeblocks and the github repository quite nicely. But I have not tried tiles, and the localization build target fails for me.

I have same problem with localization bulild but when i start use cygwin everything is nice.

Compiling in my VM right now, I’ll update the wiki if this works out.

Updated: http://www.wiki.cataclysmdda.com/index.php?title=How_to_compile#MinGW_with_MSYS

Now trying these steps myself to make sure I haven’t forgotten anything…

Seconding Soyweiser. Tried targeting, grabbing SDL libraries (this was when were were using SDL, not SDL2) and changing the target: Nothing useful. :-/

I haven’t tried Cygwin, no. The wiki said it was incompatible with SDL, I’m guessing that might be outdated information, though.

Yes, the localisation builds for CodeBlocks don’t work for me no matter what I do, either. I’ve been compiling using the standard build.

I haven’t tried Cygwin, no. The wiki said it was incompatible with SDL, I’m guessing that might be outdated information, though.[/quote]
It’s still fairly true ATM. I’ve managed to get fairly close to working with SDL2 (much closer then the old SDL), but once I’ve got SDL all set up the build bot freaks out and starts throwing me errors that generally popup only in 32bit compilation (when I’m using the 64bit version).

Hm, I didn’t realise getting the game to compile successfully with SDL could be such a challenge, I figured it was just me.