From: Sean Proctor Newsgroups: comp.os.msdos.djgpp Subject: problems with extern Message-ID: X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 50 Date: Fri, 30 Jun 2000 05:34:23 GMT NNTP-Posting-Host: 207.16.153.80 X-Complaints-To: Abuse Role , We Care X-Trace: monger.newsread.com 962343263 207.16.153.80 (Fri, 30 Jun 2000 01:34:23 EDT) NNTP-Posting-Date: Fri, 30 Jun 2000 01:34:23 EDT Organization: ENTER.net (enter.net) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com alright, either there's a bug in djgpp or I'm an idiot... I have 4 files. okay, here's how it's set up, pretty much file1.c: ... #include "file1.h" #include "file2.h" ... int function(Blah a) { init_location(locations); FILE *fp = fopen("file", "rt); /* this is the offending line according to the compiler... but the error goes away if I comment out the line above, no I didn't forget the semi-colon. ;) */ ... } ... file1.h: ... typedef struct LOCATION Location; typedef struct BLAH Blah; ... struct LOCATION { ... }; struct BLAH { ... }; ... file2.c: ... Location *locations[NUMBER]; ... void init_location(Location *loc[]) { ... } file2.h void init_location(Location *[]); ... extern Location *locations[]; and I believe that's all that's relevant... I don't see anything wrong with it... but of course I don't, I wrote it. Sean