linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: linux-c-programming@vger.kernel.org
Subject: Re: #include problem
Date: Fri, 15 Oct 2004 23:15:06 +0200	[thread overview]
Message-ID: <20041015211505.GB5033@lug-owl.de> (raw)
In-Reply-To: <200410151648.i9FGmlqM026477@students.fct.unl.pt>

[-- Attachment #1: Type: text/plain, Size: 1267 bytes --]

On Fri, 2004-10-15 17:48:47 +0100, C-16  <pmr17184@students.fct.unl.pt>
wrote in message <200410151648.i9FGmlqM026477@students.fct.unl.pt>:
> Howdy,
> i have a file main.c in my program that needs to include four headers
> aaa.h , bbb.h ,ccc.h and ddd.h . Each one of these headers need to
> include another header xxx.h . With this implementation i get a
> "redefinition" compilation error. How can i solve this problem ? Thanks
> in advance.

Could you please post the exact error message, along with the code lines
it belongs to? I think you've actually got two problems.

One was already explained by various list readers, you'd better use
appropriate header guards.

But "redefinition" and a new declaration are basically two different
things, so I think there's also the error around that your header file
possibly contains actual definitions of variable (instead of only
declarations for those...).

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2004-10-15 21:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-15 16:48 #include problem C-16 
2004-10-15 17:04 ` Eric Bambach
2004-10-15 17:04 ` pdovera
2004-10-15 17:12   ` Eric Bambach
2004-10-15 21:15 ` Jan-Benedict Glaw [this message]
2004-10-18  7:03 ` Ranga Makireddy
2004-11-07  3:39 ` Wayne Wu
  -- strict thread matches above, loose matches on Subject: below --
2004-10-15 16:55 Huber, George K RDECOM CERDEC STCD SRI
2004-10-15 17:29 C-16 

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041015211505.GB5033@lug-owl.de \
    --to=jbglaw@lug-owl.de \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).