delorie.com/archives/browse.cgi | search |
Date: | Sun, 13 Feb 2000 16:22:00 +0200 (IST) |
From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
X-Sender: | eliz AT is |
To: | Marcus <mesthlm AT hem DOT passagen DOT se> |
cc: | djgpp AT delorie DOT com |
Subject: | Re: Values in header ?? (urgent) |
In-Reply-To: | <886bi1$2l0$1@cubacola.tninet.se> |
Message-ID: | <Pine.SUN.3.91.1000213162032.2094D-100000@is> |
MIME-Version: | 1.0 |
X-MIME-Autoconverted: | from QUOTED-PRINTABLE to 8bit by delorie.com id JAA01256 |
Reply-To: | djgpp AT delorie DOT com |
Errors-To: | dj-admin AT delorie DOT com |
X-Mailing-List: | djgpp AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
On Sun, 13 Feb 2000, Marcus wrote: > Why canīt I declare a value in a header without get the error "multiple > definiton" when I include the header several times? I have tried #ifndef but > NOTHING seems to work. You are probably assuming that the compiler remembers the #define it saw in one file when it is compiling the next. This is not so: each file is preprocessed from a clean state, so the definition of the variable is included twice, and the linker complains.
webmaster | delorie software privacy |
Copyright Đ 2019 by DJ Delorie | Updated Jul 2019 |