Thanks Dan. It now compiles but gives me warnings about ‘sqlite3_api’ being 
defined in more than one module. ‘sqlite3ext.h’ is included in several files 
although I only added the SQLITE_EXTENSION_INIT1 line to one such file.


> This morning I tried creating a new blank package on c++ builder and then 
> added
>
> #include “sqlite3ext.h”
>
> Same error message : E245 Undefined symbol ‘sqlite3_api’.
>
> Is there some define I should have set?

Add "SQLITE_EXTENSION_INIT1" on a line by itself after including
sqlite3ext.h:

   http://sqlite.org/loadext.html#programming_loadable_extensions

Dan.



>
> Full code
>
>
> //---------------------------------------------------------------------------
> #include "sqlite3ext.h"
> #include <System.hpp>
> #pragma hdrstop
> #pragma package(smart_init)
> //---------------------------------------------------------------------------
>
> //   Package source.
> //---------------------------------------------------------------------------
>
>
> #pragma argsused
> extern "C" int _libmain(unsigned long reason)
> {
>          sqlite3 *DB;
>          sqlite3_stmt *s;
>          sqlite3_open("c:/SQLiteData/Meta.db",&DB); // error line
>          sqlite3_close(DB);
>          return 1;
> }
> //---------------------------------------------------------------------------
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to