[Pkg-db-devel] Bug#245498: db4.2-doc: example in the doc doesn't compile

Dominique Desbiens Dominique Desbiens <dodod@clubplus.net>, 245498@bugs.debian.org
Fri, 23 Apr 2004 10:23:00 -0400


Package: db4.2-doc
Version: 4.2.52-16
Severity: normal


I have copy the file /usr/share/doc/db4.2-doc/ref/simple_tut/example.cs
to example.c

Then:     gcc -Wall -g -o example  example.c

I get this message

/tmp/cc7qFp9i.o(.text+0x2a): dans la fonction « main »:
/home/dodod/example.c:19: undefined reference to `db_create_4002'
/tmp/cc7qFp9i.o(.text+0x3e):/home/dodod/example.c:20: undefined reference to `db_strerror_4002'
collect2: ld a retourné 1 code d'état d'exécution

Now if I look in the source I see: #include "db.h"

and below line 19: 

        if ((ret = db_create(&dbp, NULL, 0)) != 0) {
                fprintf(stderr, "db_create: %s\n", db_strerror(ret));
                exit (1);
        }


This is /usr/include/db.h  from the package libdb4.2-dev
If look inside /usr/include/db.h I see: #define db_create db_create_4002

But nowhere else did I find any information about db_create_4002


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.18
Locale: LANG=fr_CA, LC_CTYPE=fr_CA (ignored: LC_ALL set to fr_CA)

-- no debconf information