delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/14/19:00:42

From: Gloria <lucjack AT golden DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Multi-modules
Date: Wed, 14 Oct 1998 18:50:10 -0400
Organization: Golden Triangle Online
Lines: 25
Message-ID: <36252AA2.38DE@golden.net>
References: <362410B8 DOT CE1 AT golden DOT net>
NNTP-Posting-Host: 209.183.132.190
Mime-Version: 1.0
X-Mailer: Mozilla 3.04 (Win95; I)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Gloria wrote:
> 
> If anyone has read vol.II of "C for Dummies", you'll probably understand
> my question a little easier. I was working through the final madlib
> program(madlib2). But I had a problem when I tried to make an .exe out
> of the three files. Each of the modules used some pointer variables
> which were defined in two of the modules like this:
> 
> extern char *whatever;
> extern char *whatever2;
> 
> void print_array()
> {
>  .....
> 
> and so on. However, when I tried to compile, it kept saying that it
> couldn't find those pointers. Is there a different way to indicate that
> the variables are somewhere else in the program other than "extern". Oh
> yeah, I tried removing the extern thing and I got some really weird
> error messages. SOS

I tried the program again today. The file with the main() function was
empty for some reason. So I compiled all of them and the program worked
fine! Maybe, for some reason, DJGPP didn't register it as being there
yesterday. I dunno, just one of those things.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019