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