I did not used never gdb.
Can I post me commands that I must to use
(gdb) run sqlite3
Starting program: sqlite3
No executable file specified.
Use the "file" or "exec-file" command.
(gdb) run select load_extension('/root/soundex.so');
Starting program: select load_extension('/root/soundex.so');
How must I interpret this output:
bash-3.1# gcc -O0 -g -shared labsinf.c -o soundex.so
bash-3.1# gdb sqlite3
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of
This is last suggestion that I tell, where is the problem now for segmentation
fault:
bash-3.1# gcc -shared labsinf.c -o soundex.so
bash-3.1# sqlite3
SQLite version 3.5.7
Enter ".help" for instructions
sqlite> select load_extension('/root/soundex.so');
sqlite> select soundex('saverio');
S010
bash-3.1# gcc -shared labsinf.c -o inf.so
bash-3.1# sqlite3
SQLite version 3.5.7
Enter ".help" for instructions
sqlite> select load_extension('/root/inf.so');
sqlite> select inf(savio);
SQL error: no such column: savio
sqlite> select inf('savio');
SQL error: no such function: inf
sqlite>
I tell
I modified row in function:
sqlite3_result_text(ctx,(const char*)ret, 4, SQLITE_TRANSIENT);
I know that dimension is 4, but my shell don't return values for extension
function also with half.c example copied from wiki:
bash-3.1# gcc -shared half.c -o half.so
bash-3.1# sqlite3
SQLite version
The soundex function don't return results of your processing.
My output is below:
bash-3.1# gcc -shared labsinf.c -o inf.so
bash-3.1# sqlite3
SQLite version 3.5.7
Enter ".help" for instructions
sqlite> select load_extension('/root/inf.so')
...> select inf(savio)
...>
I don't understand
But I don't understand where is the error in row below:
int sqlite3_extension_init(sqlite3 *db, char **pzErrMsg, const
sqlite3_api_rountines *pApi) {
Can some suggest me something?
-
#include
#include
#include
#include
SQLITE_EXTENSION_INIT1
void
Excuse me for my stupid topic, but I am crazying to find error in program below.
My output is:
bash-3.1# gcc -shared labsinf.c -o inf.so
labsinf.c:61: error: expected ';', ',' or ')' before '*' token
The errror is for sqlit3_extension_init row, but I don't see strange things
#include
#include
Ok, I build sqlite3 with load extension support, now I must execute extension:
#gcc -shared half.c -o half.so
#export LD_LIBRARY_PATH='pwd'
#sqlite3
sqlite>.load half.so
half.so: cannot open shared file object: no such file or directory
but
#ls
half.c half.so
Where is the problem now?
Savio
ommand)...
sqlite> .load half.so
This is correct: except you need to provide the FULL path name!
SELECT load_extension('half.so');
dark0s dark0s <[EMAIL PROTECTED]> wrote: I created half.c program, the output
is:
bash-3.1# gcc -shared half.c -o half.so
bash-3.1# sqlite3
SQLite version 3.5
.load is not present in my shell sqlite3 as command!
bash-3.1# sqlite3
SQLite version 3.5.7
Enter ".help" for instructions
sqlite> .load
unknown command or invalid arguments: "load". Enter ".help" for help
sqlite> .help
.bail ON|OFF Stop after hitting an error. Default OFF
.databases
I created half.c program, the output is:
bash-3.1# gcc -shared half.c -o half.so
bash-3.1# sqlite3
SQLite version 3.5.7
Enter ".help" for instructions
sqlite> .load half.so
unknown command or invalid arguments: "load". Enter ".help" for help
sqlite> select load_extension('half.so');
SQL error:
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(
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(
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
No, it don't work, the output is:
bash-3.1# gcc -lsqlite3 labsinf.c -o inf
labsinf.c: In function 'soundex':
labsinf.c:18: error: assignment of read-only location
labsinf.c:22: error: assignment of read-only location
labsinf.c:27: error: assignment of read-only location
labsinf.c:31: error:
>Your assignment above discards the const qualifier. It also ignores the
>fact that the types differ in their signedness. You should change your
>str variable to be a const char pointer, and then explicitly cast away
>the unsigned qualifier.
>
> const char *str;
>
> str = (const
I must create a extension for a exam.
I don't want know how work soundex, but how make a extension
"D. Richard Hipp" <[EMAIL PROTECTED]> ha scritto:
On Apr 8, 2008, at 12:57 PM, dark0s dark0s wrote:
> Hi all, I'd like write extension for sqlite3 creating soundex
&g
I need help. I am doing sqlite3 extension, but something don't work at compile
time.
The output of compiler is:
bash-3.1# gcc -lsqlite3 labsinf.c -o inf
labsinf.c: In function 'soundex':
labsinf.c:16: warning: assignment discards qualifiers from pointer target type
The program is below, I am
Hi all, I'd like write extension for sqlite3 creating soundex function like
below:
void soundex() {
...
...
}
int main(int argc, char* argv[]) {
int rc;
sqlite3* db;
rc = sqlite3_open("dbforext.db",);
if (rc) {
fprintf(stderr, "E' impossibile aprire il file %s\n",
How can I to pass parameters in sql string?
For example, I type:
sql = "create table modulo(id, nome, classe, istanza);";
now, I'd like to insert a parametrized name for table. Like
echo 'create table $modulo(id, nome, classe, istanza)'
in shell scripting.
Hi all, after writing my program, I typed:
bash-3.1# gcc -lsqlite3 CreaDB.c -o creadb
CreaDB.c: In function 'main':
CreaDB.c:35: error: too few arguments to function 'sqlite3_bind_text'
CreaDB.c:36: error: too few arguments to function 'sqlite3_bind_text'
CreaDB.c:37: error: too few arguments to
>What did you download from
>http://www.sqlite.org/download.html ?
>sqlite-3.5.7.so.gz, or
>sqlite-amalgamation-3.5.7.tar.gz?
I've installed sqlite-3.5.7 precompiled package on my slackware system. Below
there is results of searches:
bash-3.1# find / -name sqlite3.c
bash-3.1#
bash-3.1#
-in function
'strlen'
CreaDB.c:5: warning: return type of 'main' is not 'int'
CreaDB.c:41:3: warning: no newline at end of file
bash-3.1# ls
CreaDB.c Desktop GNUstep loadlin16c.txt
dark0s dark0s <[EMAIL PROTECTED]> ha scritto: bash-3.1# gcc CreaDB.c sqlite3.c
-o CreaDb
gcc: sqlite3.c: No suc
at end of file
bash-3.1# ls
CreaDB.c Desktop GNUstep loadlin16c.txt
bash-3.1#
What is the problem? CreaDB is not present
Amit Uttamchandani <[EMAIL PROTECTED]> ha scritto: On Sat, 5 Apr 2008 18:16:47
+0200 (CEST)
dark0s dark0s wrote:
> Hi all, I am newbye in sqlite programming.
&g
sqlite3.c is not present in the system
I type
gcc CreaDB.c sqlite3.c -o CreaDB
but after I don't find CreaDB also in my system.
savio
-
Inviato da Yahoo! Mail.
La casella di posta intelligente.
___
Ok, excuse my ignorance, how can I to connect dinamic library with gcc
Thanks,
savio
-
Inviato da Yahoo! Mail.
La casella di posta intelligente.
___
sqlite-users mailing list
sqlite-users@sqlite.org
Hi all, I am newbye in sqlite programming.
I written a little C program to begin with sqlite, and I posted it below:
#include
#include
#include
void main() {
int rc, i;
sqlite3* db;
sqlite3_stmt* stmt;
char* sql;
const char* tail;
rc = sqlite3_open("prova.db", );
if (rc) {
28 matches
Mail list logo