Well I WAS going to come here and make another post about my procedural image system, which of course requires that I finish putting it back together after trying to make it load files properly. Unfortunately, I also noticed that there was a new version of the D compiler out, so I decided to go ahead and update to that.
This is not what I did wrong.
What I did wrong was that I blew away the entire compiler folder in the course of updating, including the source files for the standard library(Phobos). The standard library is a collection of things that pretty much everyone will probably need or want to use, such as loading a file from the disk or reading and writing text from a console…
You know, those old DOS windows?
The command line.
So I copied Phobos back to where it belongs and hit “Compile” again, fixed all the compile-time errors(Back when you programmed a computer by punching holes in a sheet of thick paper–no joke– a compile-time error was a catastrophic event which could take hours to discover, and you usually didn’t have much to go on, because it was a piece of cardstock with a bunch of holes punched in it! Modern computers are fast enough that it’s often faster to repeatedly hit the “Compile” button and fix each error as it pops up than it is to go through your code with a fine-toothed comb to find where you may have mis-typed the name of a variable once in a 2000-line file. Compiling my projects typically takes less than 30 seconds, versus the 5 or so minutes I could spend searching.), aaaaaaaaand
Oh great. Not these again.
These errors are a bit less helpful than some that DMD(the official D language compiler) spits out. What you’re seeing there is how class and function names are “mangled” by the compiler. It sounds bad, but the computer actually has an easier time making sense of these than the way they’re typed in the source code.
It’s not that this particular problem is hard to fix, it’s just very tedious. The problem in this case is typically that I haven’t told the compiler where to import all the libraries it needs(Derelict and the SDL and OpenGL bridges I use it for), so it says “Hey, I have all these mangled function names, but you never told me what I need to do with ’em.” I just need to go into the build options and tell Code::Blocks where the libraries are.
So I spent 4 hours watching anime and browsing Imgur.
Well, I’ve got to make a blog post some time today, so let’s get the import problems fixed. Pop open the hood, and…
Well everything looks like it’s in order. I probably shuffled something around while I was re-loading the libraries. I’ll just give the imports a good kick.
The libraries are missing. Yep, that would do it. So we go back to the Derelict folder(I may disagree with Aldacron on some issues, but he sure makes a mean library package!) grab these things here
And I copy them over here
And then we hit the “Compile” button again.
You know, in retrospect, I should be happy that everything went pear-shaped. Saved me from having to put together a bunch of procedural images to add to the post instead!
That’ll be next time.