[Gpe-list] building libeventdb with sqlite3
D Marlin
damarlin at gmail.com
Fri Feb 22 16:18:15 CET 2008
I am trying to build GPE natively on a Linux host and have encountered an issue.
In base/libeventdb/sqlite.c I find:
<snip>
/* The code is written using sqlite function names but they are
relatively easily mapped to sqlite3 function names. */
//#define USE_SQLITE3
</snip>
However sqlite.h (from sqlite2) is included unconditionally:
#include <sqlite.h>
Although a number of macros have been set up to map sqlite2 functions
to sqlite3, there appear to be some sqlite2 data types and function
calls that are not being handled by sqlite3, e.g:
<snip>
sqlite_vm *stmt;
const char *tail = NULL;
if (sqlite_compile (SQLITE_DB (ev->edb)->sqliteh, q, &tail, &stmt,
&err))
{
SIGNAL_ERROR (ev->edb, error,
"Loading data for event %ld: %s", ev->uid, err);
sqlite_freemem (err);
sqlite_freemem (q);
</snip>
If I try to build, I encounter the error:
sqlite.c:36:20: error: sqlite.h: No such file or directory
If I comment out the include sqlite.h line, so only sqlite3.h is
included, and build again I encounter errors:
<snip>
sqlite.c: In function 'do_events_enumerate'
sqlite.c:434: warning: implicit declaration of function 'sqlite_freemem'
sqlite.c: In function 'do_event_load':
sqlite.c:514: warning: implicit declaration of function 'sqlite_mprintf'
sqlite.c:514: warning: initialization makes pointer from integer
without a cast
sqlite.c:516: error: 'sqlite_vm' undeclared (first use in this function)
sqlite.c:516: error: (Each undeclared identifier is reported only once
sqlite.c:516: error: for each function it appears in.)
sqlite.c:516: error: 'stmt' undeclared (first use in this function)
sqlite.c:518: warning: implicit declaration of function 'sqlite_compile'
sqlite.c:535: warning: implicit declaration of function 'sqlite_step'
sqlite.c:541: warning: implicit declaration of function 'sqlite_finalize'
</snip>
I assume this is because include/sqlite.h is not found (not part of
the sqlite3 install), and these structures and functions are not part
of the sqlite3 API. It could of course be that I am simply missing a
critical piece to make this work, or a configuration issue I have
missed.
Should libeventdb be expected to build on a host with _only_ sqlite3
installed, or is sqlite2 still a requirement for building/using
libeventdb?
Thank you,
d.marlin
More information about the Gpe-list
mailing list