cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/21/15:33:59

Date: Wed, 21 Apr 1999 15:33:57 -0400
Message-Id: <199904211933.PAA08702@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <7fl6s7$obvl$1@reader3.wxs.nl> (bram.vaessen@fnmail.com)
Subject: Re: multiple cpp files
References: <7fl6s7$obvl$1 AT reader3 DOT wxs DOT nl>
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> I have a little project with a few cpp files and a header file. The problem
> is that i want to define a few variables that are known all over the project
> in all cpp files. If i define them in the header file and include the header
> file in all the cpp files they all compile but it won't link (multiple
> define error). So how can i do this? (if it is possible).

Sounds like you're forgetting the "extern" keyword.

http://www.delorie.com/djgpp/doc/ug/ - the "larger progects" sections.

- Raw text -


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