This is my first post and it is out of desperation. I am using Borland c++
builder with Borland developer studio 2006 I can not for the life of me get
anything sqlite functioning properly with this. I have relentlessly
searched google as well as the mailing list and tried any information I have
found and have been for the most part completely unsuccessful and it is
beginning to drive me a little crazy.
When I try to use the header I get errors
[C++ Error] sqlite3.h(1778): E2232 Constant member
'sqlite3_index_info::nConstraint' in class without constructors
Perhaps I can not include the header directly like that, either way I then
tried to use a dll.
I did the following from which I found in the mailing list:
impdef -a sqlite3.def sqlite3.dll
impdef sqlite3.lib sqlite3.def
I then add this lib file to my project and it compiled however when using
any code involving sqlite it turned to disaster.
I added to my code:
typedef struct sqlite3 sqlite3;
As well as:
extern "C" {
__declspec(dllimport) int sqlite3_open(const char *filename,sqlite3
**ppDb);
__declspec(dllimport) int sqlite3_close(sqlite3*);
}
It compiled fine and I was able to declare:
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
sqlite3 *db;
int res;
res = sqlite3_open("my.db",&db);
I had an if statement as well checking "res", etc but just calling
sqlite3_open causes some sort of unknown exception. I have no idea what to
do Ive been trying to figure this out for many, many hours. Can someone
please help me
Thanks and Much, much appreciation,
- Jon