Read this file before trying to compile miniGenericApp.
Just when you thought it was easy to program in THINK C -- not
all THINK C's are created equally. As a matter of fact, they're
all different in subtle ways. Read On.
Version 4.0 of THINK C supports the so-called "ANSI" standard
definition of the C language. Previous versions of the
Compiler don't. Therefore, header files and libraries that
existed in earlier versions of Lightspeed don't exist anymore.
The obvious advantage to this is that it's easier to write
portable code, i.e., code that will compile and run on non-
THINK C compilers that also support ANSI.The major disadvantage
is that you need to make slight changes to source of Generic App
depending on whether you're using Version 2, 3, or 4 of the
compiler.
Thus header file names changed between versions. Also, beginning with
version 3.0, a slick, new feature called MacHeaders was introduced.
When the MacHeaders option is selected, the compiler uses a binary file
that describes all about Mac related data types, meaning that you
don't have to include those manager header files that define fundamental
Mac data structures like Event Records, WindowRecords, and the lot.
Also between version 2 and 3, Multifinder became functional.So version
3 supports Multifinder while version 2 doesn't. There really are a lot of
changes between the three versions.
Because I want you folks out there to have running versions
of Generic App, no matter what version of the compiler that
you happen to own, I've devised a strategy that should allow everyone
to use Generic (for the time being--I want you all to upgrade if you're going to continue with us and use the code examples. These three parts of Generic will be the only code that's written with this accomodation. (BTW, Symantec isn't paying me a commission for my one-man upgrade promotion but,
perhaps they ought to offer a discount to my MacUser readers!)
Here's how you get Generic to work on your compiler:
First: Find out what version of THINK C that you're running.
Next, there are three project files, one for version 2, 3, and 4 of
THINK C. You use the one that's appropriate for your compiler. Then,
we'll let the preprocessor to fixup the code for you through the
use of a defined constant. This constant is in the file "Version.h" so
open that file right now. It's in the miniGenAppHdr folder, with all
the other header files.
Step-by-step, here's what you do:
For those of you who are running THINK C version 4.0:
0. Open project file miniGenAppπ-v4.0
1. change #undef V4 to #define V4 in Version.h.
2. make sure that you undefine V3 and V2.
3. Rename the resource file miniGenAppπ.rsrc
to miniGenAppπ-v4.0.rsrc
4. Bring the Project "Up to Date"
For those of you running version THINK C 3.01:
0. Open project file miniGenAppπ-v3.01
1. change #undef V3 to #define V3 in Version.h
2. make sure that you undefine V2 and V4.
3. Rename the resource file miniGenAppπ.rsrc
to miniGenAppπ-v3.01.rsrc
4. Bring the Project "Up to Date"
For those of you running versions Lightspeed 2.13 or 2.15:
0. Open project file miniGenAppπ-v2.13
1. change #undef V2 to #define V2 in Version.h
2. make sure that you undefine V3 and V4.
3. Rename the resource file miniGenAppπ.rsrc
to miniGenAppπ-v2.13.rsrc
4. Run the project
For those of you running anything else:
1. Isn't it time that you catch up with the rest of us?