This is the mail archive of the
mailing list for the GCC project.
Re: Inlining problem
- To: rjschwei at mindspring dot com
- Subject: Re: Inlining problem
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Thu, 04 Jan 2001 20:33:12 +1300
- CC: gcc at gcc dot gnu dot org
> The method "DeclareMatVar(MatPointVarID const &, MatPointVarID const &)"
> is declared as inline, and thus no symbol should be created when the
> method is being called. This of course leads to link errors.
"inline" is just a _hint_ to the compiler. It does not guarantee that
an outlined implementation will not be emitted somewhere, so if you
include a header file containg inline declarations the linker will get
You can use "#pragma interface"/"#pragma implementation" to ensure
that the compiler only attempts to emit an outlined implementation of
your method in one object file.
I would also suggest not pre-declaring inline functions if you want to
be sure they are inlined wherever possible. This is probibly why you
are seeing this problem.
[ bryce ]