Message-ID: <003f01bdd129$b4826270$726f6f6f@c3nt2> From: "Andrew Deren" To: "Klaus Petzold" , Subject: Re: Problem with include-files Date: Wed, 26 Aug 1998 14:42:33 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Precedence: bulk > >I have a problem under DJGPP version 2.7.2.1 when I want to implement >something like the following: > >->filename: test.h > >#ifndef _TEST_ >#define _TEST_ > >int t; you need to put: extern int t; in the include file and in either source file: int t; > >#endif > >->filename test.cc > >#include "test.h" > > >-> filename main.cc > >#include "test.h" > >int main() >{ >} > >When I link these files I get the following error message: >-multiple definition of 't' >What's wrong? > >tia... > ...Klaus... > >