Dependants and Dependencies

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.

This thing.

If I am a Jedi, this is my lightsaber.

If I am a Jedi, this is my lightsaber.

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.

Red means bad.

Red means bad.

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…

This tells the compiler where to find all the precompiled libraries it wants to talk to.

This tells the compiler where to find all the precompiled libraries it wants to talk to.

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.

I see the problem!

I see the problem!

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

Derelict is a collection of D handlers for an extensive set of free or open-source C libraries.  I've never heard of half of these.

Derelict is a collection of D handlers for an extensive set of free or open-source C libraries. I’ve never heard of half of these.

And I copy them over here

That one, right there.

That one, right there.

And then we hit the “Compile” button again.

06 fixed

0 errors, 0 warnings. That’s what I like to hear.

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.



Leave a Reply. Wheaton's Rule in full effect.

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s