home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 20615 < prev    next >
Encoding:
Internet Message Format  |  1993-01-04  |  2.1 KB

  1. Path: sparky!uunet!spool.mu.edu!enterpoop.mit.edu!eru.mt.luth.se!kth.se!dront.nada.kth.se!d88-jwa
  2. From: d88-jwa@dront.nada.kth.se (Jon Wtte)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: THINK C Primer Code Problem...
  5. Message-ID: <1993Jan4.161455.19596@kth.se>
  6. Date: 4 Jan 93 16:14:55 GMT
  7. References: <1993Jan4.153017.1397@utkux1.utk.edu>
  8. Sender: usenet@kth.se (Usenet)
  9. Organization: Royal Institute of Technology, Stockholm, Sweden
  10. Lines: 53
  11. Nntp-Posting-Host: dront.nada.kth.se
  12.  
  13. In <1993Jan4.153017.1397@utkux1.utk.edu> danny@martha.utcc.utk.edu (Danny William McCampbell) writes:
  14.  
  15. >sure I typed it in just like the book.  When I try to run it gives me
  16. >a Link Error::Undefined Button.  I have never seen this error before.
  17.  
  18. Are you sure about the spelling? C is case sensitive.
  19. However, see below:
  20.  
  21. >Could someone give me some insight on this.  I ran precompile on it
  22. >and it says that blackColor is undefined in the statement
  23.  
  24. >gFillColor = blackColor 
  25.  
  26. >blackColor occording to IM Vol. 1 is a global all ready defined in the
  27. >ROMS.  What is happening here?  I have MacTraps in the project just to
  28.  
  29. The ROM can hardly define symbols for your compiler...
  30.  
  31. And _Button is an inline pascal call that actually is not in
  32. MacTraps; it's just inline code.
  33.  
  34. ALl this makes me believe you're not including MacIncludes,
  35. or you accidentally damaged or misplaced it.
  36.  
  37. Oh, and a word of asvice to everyone:
  38.  
  39. 1) Open up the file "Mac #Includes.c"
  40. 2) Edit the #define of SIMPLIFY_PROTOTYPES so that
  41.    it says:
  42.  
  43. #define SIMPLIFY_PROTOTYPES 0
  44.  
  45. 3) Feel free to add any headers you usually use (like, AppleEvents,
  46. Folders, GestaltEqu, ...) in the #if 0 sections by changing them to
  47. #if 1
  48.  
  49. 4) Precompile
  50.  
  51. 5) Save the results as MacHeaders, replacing the existing MacHeaders.
  52.  
  53. The change in 2) above will prevent MILLIONS of bufs you may do, by
  54. making the header fascist about pointer argument types. You should
  55. also use Require Prototypes in the Project Options.
  56.  
  57. Cheers,
  58.  
  59.                             / h+
  60.  
  61. -- 
  62.  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  63.   "You NEVER hide the menu bar. You might go about and change the color
  64.   of it to the background color, but you never HIDE the menu bar."
  65.                       -- Tog
  66.