home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14798 < prev    next >
Encoding:
Internet Message Format  |  1992-08-31  |  1.9 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!destroyer!ubc-cs!bcsystems!cconstantine
  2. From: cconstantine@galaxy.gov.bc.ca
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: #pragma once whoes!!! Plea for help!
  5. Message-ID: <1992Aug31.154247.937@galaxy.gov.bc.ca>
  6. Date: 31 Aug 92 15:42:47 -0700
  7. References: <1992Aug31.135459.935@galaxy.gov.bc.ca>
  8. Organization: BC Systems Corporation
  9. Lines: 34
  10.  
  11. In article <1992Aug31.135459.935@galaxy.gov.bc.ca>, cconstantine@galaxy.gov.bc.ca writes:
  12. > I have a rather interesting problem if I may impose on you THINK C 5 gurus out
  13. > there.  The problem seems to be with the #pragma once directive.  I have this
  14. > directive at the top of each of my header files (of which there are 5 or 6) an
  15. > d I have 4 source files, 3 of which #include "AppGlobals.h".  I am _STILL_
  16. > getting a Link Error of "Multiply defined: symbol (where symbol is my global
  17. > var)" I have even tried using the #ifndef ... #endif set of things and still
  18. > get this error.  I have trashed my project and recompiled, still the same
  19. > thing.
  20. > Is there something I'm missing here.  I shouldn't be getting this.  BTW, I
  21. > don't believe I've got this type of error before.
  22. > Any help would be _MUCHLY_ appreciated.
  23. > P.S. to Keith Rollin (a.k.a. the Phantom Programmer) I've bought your first
  24. > book with Scott Knaster and am enjoying it thouroghly (sp?)!!!
  25.  
  26. BTW the conflict is with the following section in my AppGlobals.h unit:
  27.  
  28. Boolean        gQuitting;
  29. Boolean        gInBackground;
  30. WindowPtr    gMessageWindow;
  31. RgnHandle    gCursorRgn;
  32.  
  33. It is these 4 globals that I am getting the Multiply defined error on.  They
  34. are in my AppGlobals.h file (as previously mentioned) and I've #included it in
  35. 3 files.  NO OTHER CONSTANTS OR STRUCTS OR ANYTHING IS GETTING THE ERROR, JUST
  36. THESE 4 VARIABLES!!!!!!!
  37.  
  38.  Carl B. Constantine
  39.  CCONSTANTINE@galaxy.gov.bc.ca
  40.      "Opinions are my own and are not necessarily those of my employer"
  41.