How (not) to compile with MinGW

The Legend of Derpdragon: A tale of failed commits and unending compiling.

I’ve been fumbling my way through actually following the instructions in COMPILING.md, and…to call this a clusterfuck would be putting it mildly.

The good news is I eventually got it to stop puking up fatal errors. The bad news is that I’ve been waiting over an hour to compile just once. Ah, the joys of having a potato from 2009 for a computer. Though the fact that MinGW is about the only program I’ve had this much trouble with implies it’s not just my PC being ancient. >.>

So, dumping the SDL2 lib and includes where it wanted wasn’t any trouble. But when I realized it was telling me to dump the image and ttf additions into the Cataclysm root folder. Um, seriously? This gives me two options. One, I do that and have to reverse chasges before each commit because that’s my Github directory you’re telling me to mess with. Two, I copy over a GB of stuff elsewhere to play with, requiring I remember to backport any changes into my Github directory after verifying they work.

Eventually I realized that dumping the image and ttf stuff into the appropriate areas of MinGW’s folders works as well. At least, until it reminded me that I forgot the freetype content. Unless this change is the whole reason it’s been taking ages to compile. Thing is, the one and ONLY other time I got it to compile in the past, it also took a while.

The option I’ve been using instead? Simply committing changes and letting Jently sort it out. In the time it’s taken me to get just ONE compile to work, I could’ve fumbled my way through several commits and already solved the issues I’ve been working on. I’d have to repeat this compile every single time I need to test a commit.

Naturally, the only efficient way for me to actually do any source changes is the one that gets me griped at. Yes, I’m even more incompetent with compiling than I am with source code edits. But this is…frustrating.

http://prdownload.berlios.de/codeblocks/codeblocks-13.12mingw-setup-TDM-GCC-481.exe

Install that. Open the CataclysmWin.cbp file and voila.

Assuming that link checks out…I’m either gonna eat you if that proves to be a waste of time, or I’m going to just be pissed in general over the time I’ve wasted following the documentation.

Link broken?

Also I hear you, i have just about given up. I got everything done and was even able to get it to compile, however when I try to open the .exe it gives me a 0xc000007b error. Fuck me.

Yep, link borked. Git in my belly. :V

Though my perpetual compile troubles were merely a mild annoyance, having Kevin griping at me for testing my changes with the only method I can make WORK makes it far more frustrating.

Try http://sourceforge.net/projects/codeblocks/files/Binaries/13.12/Windows/codeblocks-13.12mingw-setup-TDM-GCC-481.exe. And there’s a good reason for it. The build bot isn’t your personal debugger, and it’s generally bad practice to check in broken or incomplete code.

First, it just now dawned on me that I was already using Code:blocks, which is what you gave us.
Secondly although I open the CataclysmWin.cbp it does nothing, opens no files, displays nothing except to open Code:blocks and thats it. Is it corruptered or is there something I’m missing?
And lastly, how does this help with compiling, I thought trying to use code:blocks was only for editing the json files?

Code::Blocks is an IDE, and the cbp is a code blocks project file that will load all the source code and makefile and help you navigate them and compile. It should have an option to select which version to compile and whether to compile in release/debug etc. The version I linked is the one with the mingw compiler version that supports everything we need.

Unless this version is less prone to taking over a goddamn hour to compile, the “bad practice” is still the only option that’s practical for me to use.

EDIT
Disregard, Code::Block was being an asshole and went to some kind of minimalist view that was erasing all the tabs inside the main window. Never been more pissed at aprogram. Minus MinGW of course.

Anyways, now I should be able to just build it right? It is saying it can’t find “git”. I’m assuming its trying to compile via git, which is annoying since I went through all that work to get the proper pathing for g++ to work and all that.

What are you opening it with? Code::Blocks? It should open up the cataclysm project with the source tree and all that, so if it’s not then yeah, that might be a problem. Try pulling from git again or cloning to a new repo and see if that works better.

I think the issue is git isnt in the directory that the cataclysm.cbp is. i assume ill need a few DLLs or lib files of some kind from git in a similar fashion to SDL2, or g++ for Code::Blocks to build or compile properly then?

See? I love how the stupid way of testing changes is the only one that WORKS. >_>

That is some pre-build versioning it does using git, you can remove that from the build options, but I don’t remember how at this time.

To disable automatic Git versioning during the Code::Blocks build process, go into CataclysmWin.cbp and remove the following lines of code:

<ExtraCommands> <Add before="cmd /c git --version || echo &apos;git&apos; command not found!" /> <Add before='cmd /c for /F &quot;tokens=*&quot; %%i in (&apos;git describe --tags --always --dirty&apos;) do echo #define VERSION &quot;%%i&quot; &gt; src/version.h' /> <Mode after="always" /> </ExtraCommands>

Well, now we can add how not to compile with Code::Blocks to this. I’m running into the issue of the GCC compiler missing pieces. I’ll try the version Vache linked here, since the version in the guide thread for Code::Blocks is just plain fucked.

Is it just me, or just the very CONCEPT of compiling hate me? :V

EDIT: Yeah, even after removing the part that Rivet said to remove, I’m getting that error too. Goddamnit.

I can’t even get a compiler to work…the one that comes with it doesn’t work and I don’t know of alternatives that work for me even after digging around in the web.

…yeah. I’ve had no luck whatsoever.

If you are compiling on Windows, I suggest you use MSYS2. It is the most reliable and easiest way to do it in my humble opinion.

If you need live help, come and hang out in #CataclysmDDA on freenode. I am sure I or someone else can help you out on the spot with every problem you can encounter.

Still have yet to try MSYS2, though I have the installer on hand somewhere. Been rather swamped lately. Still, thank you.