Hi,
I got the book, "The definitive guide to SQLite". Wondering if anyone has same
issue or know the answer.
Following is the error when compiling the example CAPI example code
[tjy...@ibm examples]$ ls
capi common foods.sql perl ruby tcl
capi_ext foods.db java python sql.sql
[tjy...@ibm examples]$
[tjy...@ibm capi]$ gmake
gcc -c -D_REENTRANT -fPIC -pthread -W -Wall -g -D DEBUG util.c
util.c: In function âexecuteâ:
util.c:9: warning: passing argument 5 of âsqlite3_execâ from incompatible
pointer type
util.c:14: warning: passing argument 1 of âsqlite3_freeâ discards qualifiers
from pointer target type
util.c: In function âprint_errorâ:
util.c:27: error: âsâ undeclared (first use in this function)
util.c:27: error: (Each undeclared identifier is reported only once
util.c:27: error: for each function it appears in.)
util.c:32: warning: passing argument 1 of âsqlite3_freeâ discards qualifiers
from pointer target type
util.c:27: warning: second parameter of âva_startâ not last named argument
util.c: In function âprint_sql_resultâ:
util.c:43: warning: unused variable âstmtâ
util.c:42: warning: unused variable âtailâ
util.c:41: warning: unused variable ârcâ
util.c:80: warning: control reaches end of non-void function
util.c: At top level:
util.c:195: warning: unused parameter âdataâ
gmake: *** [util.o] Error 1
[tjy...@ibm capi]$
Tracing the C code and found va_start using "s" undeclared.
> if(msg) {
> va_list ap;
> va_start(ap,s);
[tjy...@ibm capi]$ ls
authorizer.c capi.suo Debug Makefile test.c
authorizer.ilk columns.c ex1.c mprintf.c test.db
authorizer.vcproj columns.ilk exec_busy.c parameters.c util.c
auth_trans columns.vcproj exec.c parameters.ilk util.h
auth_trans.c create.c exec.ilk parameters.vcproj
capi.cpp create.ilk exec.vcproj select.c
capi.ncb create.o get_table.c select.ilk
capi.sln create.vcproj main.c select.vcproj
[tjy...@ibm capi]$
T.J. Yang
_________________________________________________________________
Windows Live™ Hotmail®: Celebrate the moment with your favorite sports pics.
Check it out.
http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_photos_072009&cat=sports
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users