Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!charyb!dan From: dan@charyb.COM (Dan Mick) Newsgroups: comp.lang.c Subject: Re: Extern variables question Message-ID: <312@charyb.COM> Date: 17 Nov 89 18:41:51 GMT References: <1958@atanasoff.cs.iastate.edu> <89320.012957CMH117@PSUVM.BITNET> Reply-To: dan@charyb.UUCP (Dan Mick) Distribution: na Organization: KFW Corporation, Newbury Park, CA Lines: 14 In article <89320.012957CMH117@PSUVM.BITNET> CMH117@PSUVM.BITNET (Charles Hannum) writes: >You should define a global variable in *exactly one* module, no more, no less. >All other modules should refer to it as an extern. Most linkers will generate >an error if a global variable by the same name is defined in more than one >module. Again: What? Most PC linkers I've used will; but not Microsoft's, at least not with C 5.1, and *no* Unix linker I've ever heard of does. That seems, to me, to be one of the huge implementation-philosophy differences between Unix-oid C and PC-oid C. -- .sig files are idiotic and wasteful.