Having read the link Dan suggested I take it I shouldn’t be changing all my sqlite3.h includes to sqlite3ext.h. I should only be using sqlite3ext.h in the file I’m creating for the loadable extension? I’m very short on experience and easily confused when it comes to compiler directives, dll’s, filing etc.
To start off, I’m looking to use the carray extension. Keith has made some suggestions to me regarding adding code to the bottom of the amalgamation file but for the time being I’m trying to follow some of the sqlite documentation. On this page https://www.sqlite.org/carray.html it says The carray() function is not compiled into SQLite by default. It is available as a loadable extension<https://www.sqlite.org/loadext.html> in the ext/misc/carray.c<https://www.sqlite.org/src/artifact?ci=trunk&filename=ext/misc/carray.c> source file. When I click on the ext/mis/carray.c link it takes me to a page with source code. Am I supposed to copy and paste that source code or is it already in the amalgamation somewhere? Or is there some files beyond the amalgamation I should be downloading? Tom From: Dan Kennedy<mailto:danielk1...@gmail.com> Sent: 20 August 2017 09:21 To: sqlite-users@mailinglists.sqlite.org<mailto:sqlite-users@mailinglists.sqlite.org> Subject: Re: [sqlite] Including sqlite3ext.h instead of sqlite3.h On 08/20/2017 02:33 PM, x wrote: > 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 _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users