[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to suppress the "multiple definitions of symbol"
From: |
Paul Pluzhnikov |
Subject: |
Re: How to suppress the "multiple definitions of symbol" |
Date: |
Sun, 03 Dec 2006 18:21:27 -0800 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux) |
csmgroup@gmail.com writes:
> <<<<<header.inl>>>>
> Hello::Hello(int i_, int j_) { ... }
> void Hello::print() { ... }
> <<<<module>>>>
> #include "header.h"
> #include "header.inl"
...
> And the main program has the same .inl even though it doesn't use the
> class.
In this case, you must declare the methods "inline".
> There are error messages that symbols are duplicated.
That's correct: you didn't make them inline, and you provided 2
separate definitions, hence the error.
> I think there is a g++ flag that can suppress this kind of error.
> Any ideas?
There might be a flag to suppress such errors, but why not write
correct code instead?
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
- How to suppress the "multiple definitions of symbol", csmgroup, 2006/12/03
- Re: How to suppress the "multiple definitions of symbol",
Paul Pluzhnikov <=
- Re: How to suppress the "multiple definitions of symbol", csmgroup, 2006/12/04
- Re: How to suppress the "multiple definitions of symbol", Ulrich Eckhardt, 2006/12/04
- Re: How to suppress the "multiple definitions of symbol", csmgroup, 2006/12/04
- Re: How to suppress the "multiple definitions of symbol", Maxim Yegorushkin, 2006/12/05
- Re: How to suppress the "multiple definitions of symbol", address@hidden, 2006/12/05
- Re: How to suppress the "multiple definitions of symbol", Ulrich Eckhardt, 2006/12/05
- Re: How to suppress the "multiple definitions of symbol", Ulrich Eckhardt, 2006/12/05
- Re: How to suppress the "multiple definitions of symbol", csmgroup, 2006/12/06
- Re: How to suppress the "multiple definitions of symbol", Ulrich Eckhardt, 2006/12/07