Package: libapt-pkg-dev
Version: 0.5.21
Severity: normal

Hi,

When experimenting with cache iterators in gnome-apt, I discovered that
the apt-pkg headers contain some methods which are declared inline, but for
which the actual definition is not there. Current gcc chokes on this, even
with optimization turned off (through -O0).

[EMAIL PROTECTED]:/usr/src/packages/gnome-apt/gnome-apt-0.4.6/src$ cat test.cc
#include <apt-pkg/pkgcache.h>
int main (void) { pkgCache::PkgIterator i; i.TargetVer(); return 0; }
[EMAIL PROTECTED]:/usr/src/packages/gnome-apt/gnome-apt-0.4.6/src$ LANG=C gcc 
-Wall -g -O0 test.cc -lapt-pkg -o test
/usr/include/apt-pkg/cacheiterators.h:81: warning: inline function `
   pkgCache::VerIterator pkgCache::PkgIterator::TargetVer() const' used but
   never defined
/tmp/ccHdDzWs.o(.text+0x30): In function `main':
/usr/src/packages/gnome-apt/gnome-apt-0.4.6/src/test.cc:5: undefined reference 
to `pkgCache::PkgIterator::TargetVer() const'
collect2: ld returned 1 exit status
[EMAIL PROTECTED]:/usr/src/packages/gnome-apt/gnome-apt-0.4.6/src$


Regards,

Filip

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux lucretia 2.6.2-rc1 #1 Wed Jan 21 19:21:43 CET 2004 i686
Locale: LANG=C, [EMAIL PROTECTED]

-- 
"Users somehow manage to remember 50 random ten-digit phone numbers
 effortlessly, but can't remember their one single password, which they
 chose themselves."
        -- Jeremiah DeWitt Weiner in comp.sys.sun.admin

Reply via email to