[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] new packet type problem



On Mon, 16 Jul 2001, Oliver Dawid wrote:

> > ANT/dynrtpsession.o: In function
> > `__static_initialization_and_destruction_0':
> > ANT/dynrtpsession.o(.text+0x1147): undefined reference to
> > `hdr_rtcp1::offset_'
> > collect2: ld returned 1 exit status
> > 
> 
> ok found the missing thing: i had to declare 
> 
> int hdr_rtcp1::offset_;
> 
> in the .cc file - but i wonder, why. the header file is included, so the
> struct is visible for the function.

Probably because, like most offset_, it's defined as static, limiting
its scope to the rest of the source file it's in.

So removing the appropriate 'static' might be a more elegant fix,
unless you start getting confused about which offset_ you're actually
using.

L.

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>