[comp.sys.mac.programmer] Think C and System 7.0

tj@cs.ucla.edu (Tom Johnson) (09/08/90)

Last night I was reading in Inside Mac VI about the Gestalt trap, and I 
had heard that it was supported in System 6.0.5 so I decided to try it
out myself.  I took the System 7.0 Think interfaces from the 7.0a9 CD-ROM
and installed them in in my copy of Think C.  I was kind of surprised that
there wasn't a replacement MacTraps library, or an additional System7.0 
library, but I thought I'd give it a try anyways.  I wrote a little
program:
  
  #include <Gestalt.h> 
  main()
  {
	OSErr theErr;
	long  response;

	theErr = Gestalt('sysv', &response);
  }

Of course I had the MacHeaders option selected in the preferences, and
I updated the MacHeaders file to the one supplied in the 7.0 interfaces
folder.  Everything compiles OK, but fails to link--I get the error:
"undefined: Gestalt (gestalt.c)".  I figured that this was because the
Gestalt trap glue isn't in the MacTraps library. I looked around on the
CD-ROM some more and I found the Interface.o file in the MPW System 7.0
interfaces. I tried to convert this file to a Think C library using the
oConv program, but I got an error: "object file too large".

My questions:
	1.  Am I right in assuming that I need a new library, or a 
	    new version of MacTraps in order to use the new routines?
	2.  Has anyone successfully managed to convert the interface.o
	    file?  Is this the file I need?
	3.  Can anyone help?  Please?

Thanks-

Tom






--
Tom Johnson      UCLA Computer Science Department 
			3413 Boelter Hall, Los Angeles CA 90024 (213)825-6952
			Internet:  tj@cs.ucla.edu

murat@farcomp.UUCP (Murat Konar) (09/11/90)

In article <38754@shemp.CS.UCLA.EDU> tj@cs.ucla.edu (Tom Johnson) writes:

[ problems using Gestalt in THINK C ]
>
>My questions:
>	1.  Am I right in assuming that I need a new library, or a 
>	    new version of MacTraps in order to use the new routines?
>	2.  Has anyone successfully managed to convert the interface.o
>	    file?  Is this the file I need?
>	3.  Can anyone help?  Please?

I was trying to use Gestalt from THINK Pascal 2.x.  I ended up having to 
write my own inline glue routines to the Gestalt calls.  They should work
in THINK C as well. I don't have them on me at the moment but if there's 
enough interest out there (and if someone doesn't beat me to it), I can 
post them tomorrow.
               
-- 
____________________________________________________________________
Have a day. :^|             
Murat N. Konar	
murat@farcomp.UUCP             -or-          farcomp!murat@apple.com

das@Apple.COM (David Shayer) (09/12/90)

The header and library files for System 7 for Think C and Pascal
were on the Big Bang CD.  This is the CD containing System 7.0a9,
handed out to all registered developers at the May developers
conference.

David

tj@kona.cs.ucla.edu (Tom Johnson) (09/12/90)

In article <44702@apple.Apple.COM> das@Apple.COM (David Shayer) writes:
>The header and library files for System 7 for Think C and Pascal
>were on the Big Bang CD.  This is the CD containing System 7.0a9,
>handed out to all registered developers at the May developers
>conference.
>
>David

Unfortunately this disk doesn't contain the required glue files for the 
System 7.0 routines.  The glue is there for MPW in the form of the 
Interface.o file.  However it is too large to be converted to a library with
the oConv utility.  I've been told (by Symantec) that the Interface.o file
is available in the Developers Folder of Applelink in 3 smaller pieces
which can be converted by oConv, along with a 4.0.3 release of Think C
which fixes the AppParmHandle problem that OnCue causes under 7.0.

Has anyone out there downloaded this?  Any luck at all?


Thanks--
  Tom

--
Tom Johnson      UCLA Computer Science Department 
			3413 Boelter Hall, Los Angeles CA 90024 (213)825-6952
			Internet:  tj@cs.ucla.edu