home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!ames!data.nas.nasa.gov!taligent!apple!mkelly
- From: mkelly@Apple.COM (Michael Kelly)
- Newsgroups: comp.sys.mac.programmer
- Subject: Think C MacHeaders weirdness
- Message-ID: <72240@apple.Apple.COM>
- Date: 10 Sep 92 08:23:08 GMT
- Organization: Apple Computer Inc., Cupertino, CA
- Lines: 27
-
-
- OK, this is strange. I had a simple program that first initialized the
- toolbox with InitFonts, etc., in the correct order, and then went on to
- make some File Manager calls. The initialization routine was in a separate
- file from both main and the rest of the program. I wasn't including
- MacHeaders in the Prefix. I ran the program with the debugger, and it
- crashed violently in the toolbox initialization routine. I tried a few
- things, none of which made any difference. I finally #included MacHeaders
- at the top of the file, and then it worked. Weird.
-
- The next call was in a different file. It was to FSMakeFSSpec, which failed,
- saying the volume didn't exist. There was nothing wrong with the call. I
- #included MacHeaders, on a whim, in that file, and magically the function
- worked as it should.
-
- The next call was to OpenWD, in yet another file. It stopped in the
- debugger with a bus error inside MacTraps2. "Well, this is silly," I
- thought, and I put MacHeaders in the Prefix. Now the program works as
- it should (well, except for some other unrelated things....)
-
- So, any ideas? Has anyone run into this sort of weirdness before?
-
- Mike.
- --
- _____________________________________________________________________________
- Michael A. Kelly Apple Computer, Inc.
- mkelly@apple.com Advanced Technology Group, Graphics Software
- _____________________________________________________________________________
-