Hi,
I've been searching the web for a couple of days and can't seem to find clear instructions on how to do this.
SQLite doesn't have math functions like, sine, cosine, etc.. I found a library that extends SQLite and adds these functions, but I can't figure out how to compile the library.
http://lhealy.livejournal.com/6306.html
I've tried just about everything (except the solution). I downloaded the SQLite source, configured and used make, then tried to build the dynamic library with the following command within the extension's source directory
gcc -fPIC func_ext.c -shared -o libsqlitefunctions.so -Isqlite3 -Isqlite3/src
I have the sqlite3 source within this directory so the -I flags should be pointing to the correct directory. This is the error that I get.
func_ext.c:91: error: static declaration of ‘acosh’ follows non-static declaration
func_ext.c:99: error: static declaration of ‘asinh’ follows non-static declaration
func_ext.c:107: error: static declaration of ‘atanh’ follows non-static declaration
func_ext.c:403: error: conflicting types for ‘isblank’
/usr/include/ctype.h:242: error: previous definition of ‘isblank’ was here
func_ext.c: In function ‘properFunc’:
func_ext.c:422: warning: pointer targets in passing argument 1 of ‘sqlite3StrDup’ differ in signedness
func_ext.c:422: warning: pointer targets in assignment differ in signedness
func_ext.c: In function ‘padlFunc’:
func_ext.c:463: warning: pointer targets in assignment differ in signedness
func_ext.c: In function ‘padrFunc’:
func_ext.c:509: warning: pointer targets in assignment differ in signedness
func_ext.c: In function ‘padcFunc’:
func_ext.c:556: warning: pointer targets in assignment differ in signedness
func_ext.c: In function ‘strfilterFunc’:
func_ext.c:607: warning: pointer targets in assignment differ in signedness
func_ext.c:608: warning: pointer targets in assignment differ in signedness
func_ext.c:616: warning: pointer targets in passing argument 1 of ‘sqlite3ReadUtf8’ differ in signedness
func_ext.c:618: warning: pointer targets in passing argument 1 of ‘sqlite3ReadUtf8’ differ in signedness
func_ext.c: In function ‘_substr’:
func_ext.c:654: warning: pointer targets in passing argument 1 of ‘sqlite3ReadUtf8’ differ in signedness
func_ext.c:659: warning: pointer targets in passing argument 1 of ‘sqlite3ReadUtf8’ differ in signedness
func_ext.c:664: warning: pointer targets in passing argument 1 of ‘sqlite3ReadUtf8’ differ in signedness
func_ext.c:665: warning: pointer targets in passing argument 1 of ‘sqlite3ReadUtf8’ differ in signedness
func_ext.c: In function ‘charindexFunc’:
func_ext.c:716: warning: pointer targets in passing argument 1 of ‘_substr’ differ in signedness
func_ext.c:716: warning: pointer targets in passing argument 2 of ‘_substr’ differ in signedness
func_ext.c: In function ‘rightFunc’:
func_ext.c:775: warning: pointer targets in assignment differ in signedness
func_ext.c:779: warning: pointer targets in passing argument 1 of ‘sqlite3ReadUtf8’ differ in signedness
func_ext.c: In function ‘ltrimFunc’:
func_ext.c:833: warning: pointer targets in assignment differ in signedness
func_ext.c: In function ‘rtrimFunc’:
func_ext.c:851: warning: pointer targets in assignment differ in signedness
func_ext.c: In function ‘trimFunc’:
func_ext.c:872: warning: pointer targets in assignment differ in signedness
func_ext.c: In function ‘replaceFunc’:
func_ext.c:914: warning: pointer targets in assignment differ in signedness
func_ext.c:915: warning: pointer targets in assignment differ in signedness
func_ext.c:916: warning: pointer targets in assignment differ in signedness
func_ext.c: In function ‘reverseFunc’:
func_ext.c:975: warning: pointer targets in assignment differ in signedness
func_ext.c:982: warning: pointer targets in passing argument 1 of ‘sqlite3ReadUtf8’ differ in signedness
func_ext.c: In function ‘differenceFunc’:
func_ext.c:1336: warning: pointer targets in passing argument 1 of ‘sqlite3ReadUtf8’ differ in signedness
func_ext.c:1336: warning: pointer targets in passing argument 1 of ‘sqlite3ReadUtf8’ differ in signedness
Thank you! Sandro