[sqlite] Addition extension function failed!

2008-04-09 Thread dark0s dark0s
Ok, but I did not understand step by step how work. In wiki there is: #include SQLITE_EXTENSION_INIT1 static void halfFunc( sqlite3_context *context, int argc, sqlite3_value **argv ){ sqlite3_result_double(context, 0.5*sqlite3_value_double(argv[0])); } int sqlite3_extension_init( s

Re: [sqlite] Addition extension function failed!

2008-04-09 Thread Dennis Cote
dark0s dark0s wrote: > I have a new problem, I am attempting add extension function to sqlite3. > My program labsinf.c now build successfully, but I didn't add my extension. I > don't understand what it is miss. > Help me please. > > > bash-3.1# gcc -lsqlite3 labsinf.c -o inf > bash-3.1# ./inf >

Re: [sqlite] Addition extension function failed!

2008-04-09 Thread Ken
For the solution see: http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions 1. you may need to re-compile sqlite with loadable extensions, depending upon the version of sqlite you may need to edit the makefile. 2. Create a .sqliterc file that loads your .so file select load_extension(' /home/

[sqlite] Addition extension function failed!

2008-04-09 Thread dark0s dark0s
I have a new problem, I am attempting add extension function to sqlite3. My program labsinf.c now build successfully, but I didn't add my extension. I don't understand what it is miss. Help me please. The program labsinf.c make inf, and after I typed ./inf, it makes dbforext.db. Some output is be