I’m having a bit of trouble with my copy and paste skills, it seems.

I recently modified a certain tutorial to do a few nifty things, and decided to add text using NeHe’s 13th lesson on text. Thus, I copied down the code as it was printed, and attempted a compile.

As usual, I got errors. However, after I got rid of the usual simple typos and misspellings, I am left with 6 errors that won’t go away.

The first three are the classes that I added from his lesson, BuildFont, glPrint, and KillFont, each giving the error “undeclared identifier”. Below them are three more errors, declaring that these three classes are redefinitions; different type modifiers.

I’m afraid I’m at my wit’s end, as I simply can’t tell what the trouble is (well, no, thats not quite accurate. I just need to know what in particular it is that I did that caused the problem, and how to fix it). Any help would be greatly appreciated.

Sounds like you have missed an include file that declares the stuff you get errors about…


you may have in a c++ file included a head file which is also included in another C++ file, and in this head file some (global) variables are declared.
So declare global variables in one file (not the head file)and refere them as “extern” in other files