[comp.sys.mac.programmer] TC4 MacHeaders

ech@cbnewsk.ATT.COM (ned.horvath) (09/28/89)

From article <14784@netnews.upenn.edu>, by hvs@pender (H.V. Sorensen):
> ...v. 4 of Think C (TC)...using the name "shadow"...
> I am using a "virgin" copy of TC4 with the ANSI library as only other file in
> my project. By changing the name to anything but shadow, the program compiles
> perfectly. Are there reserved words in TC that I am not aware of?...

Yup: "shadow" is an enum constant defined in Quickdraw.h.  By default,
TC4 uses the compressed MacHeaders to include declarations for commonly
used Toolbox managers' structs, constants, etc.

To correct, pick "Options..." from the "Edit" menu, touch "Code Generation"
(sic) on the left then uncheck "<MacHeaders>" on the right.  To change
the default to the unchecked option, touch "This Project" and ">>Copy>>"
at the top of the window.

The MacHeaders option is very nice, by the way, and need not be restricted
to use with Symantec's headers.  I added the prototypes that have made
the rounds to the file "Mac #includes.c", selected "Precompile..." from
source menu, and saved over the old MacHeaders.  With a large project,
you'd want to add your project headers as well.  This makes a fast compiler
run even faster.

BTW, the precompiled header bit is an old Manx/Aztec trick.  Nobody said
Think was too proud to adopt a good idea...

=Ned Horvath=