This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: duplicate definitions from linker
- From: Eljay Love-Jensen <eljay at adobe dot com>
- To: Alf Salte <salte at socketip dot no>, gcc-help at gcc dot gnu dot org
- Date: Mon, 16 Dec 2002 07:15:09 -0600
- Subject: Re: duplicate definitions from linker
Hi Alf,
Style point. For your file arrangement, A.hxx should include B.hxx, and
not (IMO) put A::func as an inline in the B.hxx file. As you have it, I
presume that B.hxx includes A.hxx, because A::func needs to be aware of
it's declaration.
But that immaterial as to your issue regarding duplicate definitions. It's
possible that A::func's body is too complicated to inline. Remember,
"inline" is only a suggestion.
As a temporary cure, it may behoove you to move A::func into your A.cxx
file as a non-inline (outline? normal? hmmm, what's the term?) method.
Could you include a minimal code snippet that demonstrates this
problem? And what platform are you using GCC 3.2 on?
Thanks,
--Eljay