Michele Santucci wrote:
Following your hint I create a simple project (linked sqlite3.lib and
included sqlite3.h) where I just do this:
Edit2->Text = AnsiString( sqlite3_libversion() );
I got this at compile time:
[C++ Error] sqlite3.h(1719): E2232 Constant member
'sqlite3_index_info::nConstraint' in class without constructors
[C++ Error] sqlite3.h(1719): E2232 Constant member
'sqlite3_index_info::aConstraint' in class without constructors
[C++ Error] sqlite3.h(1719): E2232 Constant member
'sqlite3_index_info::nOrderBy' in class without constructors
[C++ Error] sqlite3.h(1719): E2232 Constant member
'sqlite3_index_info::aOrderBy' in class without constructors
[C++ Error] sqlite3.h(1719): E2232 Constant member
'sqlite3_index_info::aConstraintUsage' in class without constructors
Pretty strange....
Michele,
This is also a bug in the Borland/CodeGear C++ compiler (see
http://qc.borland.com/wc/qcmain.aspx?d=32959 ). I am trying to get this
report reopened, but in the meantime you will probably have to change
the sqlite3.h file to add a conditional around the sqlite3_index_info
definition, and remove the offending const qualifiers like this:
#ifdef __BORLANDC__
struct sqlite3_index_info {
/* Inputs */
int nConstraint; /* Number of entries in aConstraint */
const struct sqlite3_index_constraint {
int iColumn; /* Column on left-hand side of
constraint */
unsigned char op; /* Constraint operator */
unsigned char usable; /* True if this constraint is usable */
int iTermOffset; /* Used internally - xBestIndex
should ignore */
} *aConstraint; /* Table of WHERE clause constraints */
int nOrderBy; /* Number of terms in the ORDER BY clause */
const struct sqlite3_index_orderby {
int iColumn; /* Column number */
unsigned char desc; /* True for DESC. False for ASC. */
} *aOrderBy; /* The ORDER BY clause */
/* Outputs */
struct sqlite3_index_constraint_usage {
int argvIndex; /* if >0, constraint is part of argv to
xFilter */
unsigned char omit; /* Do not code a test for this
constraint */
} *aConstraintUsage;
int idxNum; /* Number used to identify the index */
char *idxStr; /* String, possibly obtained from
sqlite3_malloc */
int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if
true */
int orderByConsumed; /* True if output is already ordered */
double estimatedCost; /* Estimated cost of using this index */
};
#else
struct sqlite3_index_info {
/* Inputs */
const int nConstraint; /* Number of entries in aConstraint */
const struct sqlite3_index_constraint {
int iColumn; /* Column on left-hand side of
constraint */
unsigned char op; /* Constraint operator */
unsigned char usable; /* True if this constraint is usable */
int iTermOffset; /* Used internally - xBestIndex
should ignore */
} *const aConstraint; /* Table of WHERE clause constraints */
const int nOrderBy; /* Number of terms in the ORDER BY
clause */
const struct sqlite3_index_orderby {
int iColumn; /* Column number */
unsigned char desc; /* True for DESC. False for ASC. */
} *const aOrderBy; /* The ORDER BY clause */
/* Outputs */
struct sqlite3_index_constraint_usage {
int argvIndex; /* if >0, constraint is part of argv to
xFilter */
unsigned char omit; /* Do not code a test for this
constraint */
} *const aConstraintUsage;
int idxNum; /* Number used to identify the index */
char *idxStr; /* String, possibly obtained from
sqlite3_malloc */
int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if
true */
int orderByConsumed; /* True if output is already ordered */
double estimatedCost; /* Estimated cost of using this index */
};
#endif
Be advised, that after I do this I get a similar unresolved external
error for _sqlite3_libversion. I'm trying to see what might be causing
this, but the generated sqlite3.lib file looks OK on first inspection.
HTH
Dennis Cote
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------