Friday, October 12, 2007

Lab Crunch time (makefile lab)

During the past few weeks, I had been too engrossed in getting my Mozilla build working (and all the SDK software) working on my Windows 2003 Server system. Sine I've finally gotten myself through all that now, I've gone into Crunch mode to get all the subsequent labs (which I postponed for my build) done.

Well, technically I was supposed to do the makefile lab before the build, but it didn't seem as essential to the course at the time. But now that I'm doing the lab, I've noticed that I couldn't find any blogs on this one at all (I'm pretty sure I went through 98% of the individual blogs listed on the planet). The resources listed in the lab were useful in getting a makefile created though, but I appear to be having a very unexpected problem doing this on a lab PC.

The MSVC8.bat build environment doesn't recognize the 'cc' command!

Not knowing any other c compilers to use in that environ, I switched to running make using just the command prompt. Unfortunately, it didn't recognize 'cc' either. However, using $(CC) in my makefile instead of 'cc', it brings up the default compiler for the environment, which is Borland C++ for command prompt. Frustratingly, Borland went looking for .cpp source files to compile instead of nled's .c source files. Another brick to the head.

Switching back to the labs suggested build environ, now using the $(CC) command in my file instead, somehow still calls 'cc' for a compiler, even though I still get the error: "make: cc: Command not found"

Looking through the makefile examples I've found online, I'm fairly convinced that my makefile would work if not for this "command not found" error.

So for now I'm off to fill my depraved stomach, and then try out the other labs, until I can find an answer to this problem.

- Andrew R. (JM)

P.S.: Does anybody know how (or someone who does) to create a Hackergotchi in Photoshop (or some other lab default image editor program) instead of the strange one that is used in the link which Chris's "Hackergotchi how to" blog points us to?