Mail Archives: djgpp/2000/06/30/02:00:43
From: | Sean Proctor <sproctor AT ccs DOT neu DOT edu>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | problems with extern
|
Message-ID: | <n1colsooqlrmkltk8f3b2hgnbinmj67jvk@4ax.com>
|
X-Newsreader: | Forte Agent 1.7/32.534
|
MIME-Version: | 1.0
|
Lines: | 50
|
Date: | Fri, 30 Jun 2000 05:34:23 GMT
|
NNTP-Posting-Host: | 207.16.153.80
|
X-Complaints-To: | Abuse Role <abuse AT enter DOT net>, We Care <abuse AT newsread DOT com>
|
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
- Raw text -