public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Emmanuel Lambert" <Emmanuel.Lambert@advalvas.be>
To: help-gcc@gnu.org
Subject: "multiply defined" error
Date: Sun, 14 Nov 1999 15:30:00 -0000	[thread overview]
Message-ID: <942622165.193303@marvin> (raw)

Hi,

I compiled all my .cc files (including a file with main() ) with g++ -c
This worked fine.
Now, I want to fit everything together with g++ file1.o file2.o file3.o ....
but this gives lots of errors, all the same.

The errors look like this :
-----------------------------------------------------------
ld: fatal: symbol `MCL::MCL(char *, char *, char *)' is multiply defined:
        (file mcltrain.o and file mcl.o);
-----------------------------------------------------------

Why is this ?

I DID include lines likes this in my files :

-----------------------------------------------------------
#ifndef File1_h
#define File1_h 0

...

#endif
-----------------------------------------------------------

Please help me out.

Thank you!

Emmanuel Lambert



WARNING: multiple messages have this Message-ID
From: "Emmanuel Lambert" <Emmanuel.Lambert@advalvas.be>
To: help-gcc@gnu.org
Subject: "multiply defined" error
Date: Tue, 30 Nov 1999 23:28:00 -0000	[thread overview]
Message-ID: <942622165.193303@marvin> (raw)
Message-ID: <19991130232800.gBashZA7eQd9__4aJ1NQQPffhAOpqBunqUE4zlKosdc@z> (raw)

Hi,

I compiled all my .cc files (including a file with main() ) with g++ -c
This worked fine.
Now, I want to fit everything together with g++ file1.o file2.o file3.o ....
but this gives lots of errors, all the same.

The errors look like this :
-----------------------------------------------------------
ld: fatal: symbol `MCL::MCL(char *, char *, char *)' is multiply defined:
        (file mcltrain.o and file mcl.o);
-----------------------------------------------------------

Why is this ?

I DID include lines likes this in my files :

-----------------------------------------------------------
#ifndef File1_h
#define File1_h 0

...

#endif
-----------------------------------------------------------

Please help me out.

Thank you!

Emmanuel Lambert



             reply	other threads:[~1999-11-14 15:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-14 15:30 Emmanuel Lambert [this message]
1999-11-14 19:30 ` Arthur Gold
1999-11-30 23:28   ` Arthur Gold
1999-11-30 23:28 ` Emmanuel Lambert

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=942622165.193303@marvin \
    --to=emmanuel.lambert@advalvas.be \
    --cc=help-gcc@gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).