[PD-dev] connecting to an extended sqlite3 database

Julian Villegas julovi at yahoo.com
Tue Nov 9 18:32:40 CET 2010


The problem was that sqlite3 was compiled for 64-bit, I fixed downloading the 
tar file of the amalgamation version, using 

./configure CFLAGS=-m32
and proceeding as mentioned in the install file inside the tar. After that, 
compiling the PD object giving the 

LDFLAGS = -L/usr/local/lib -lsqlite3

 Julian Villegas, Ph.D.
http://julovi.net


Me pregunto de un modo pensativo
Que significa ser Colombiano?
No se le respondi. Es un acto de fe
JLB.



----- Original Message ----
> From: Julian Villegas <julovi at yahoo.com>
> To: pd-dev at iem.at
> Sent: Mon, November 8, 2010 11:28:58 PM
> Subject: [PD-dev] connecting to an extended sqlite3 database
> 
> Hi,
> 
> I'm trying to connect to a sqlite3 database v.3.7.3 (amalgamation).  Since 
> sqlite3 doesn't come with mathematical functions like sqrt, I needed  to extend 
>
> it using extension-functions.c (available from http://sqlite.org/contrib). 
> Before the extension, I was able to query the database with no problem. Now  
>with 
>
> the extension, I needed to add these lines to my  code:
> 
> ...
>         error  =sqlite3_enable_load_extension(x->db,1); ///Enable loading 
> mathematical  extensions
>         if(error){
>              post("error enabling  extension loading");
>          }
>         
> error=sqlite3_load_extension(x->db,"libsqlitefunctions.dylib",0,x->pzErrMsg);
> ...
> 
> The  code compiles fine, but when I try to run it I have this  error:
> 
> dlopen(PathToMyObj.pd_darwin, 10): Symbol not found: 
> _sqlite3_enable_load_extension
> 
> I believe that's a linking error, but  I don't know how to solve it, and I'm 
> sorry but I can't include a minimal  functioning example. But, I can tell you 
> what I have:
> I'm using a  Makefile posted here 
> http://puredata.info/docs/developer/MakefileTemplate
> I'm in a MacBook  Pro 10.6.4
> I'm using Pd-Extended v. 0.42.5
> 
> I guess is something simple  like adding a filename to the compiler, but I just 
>
> can't figure it out, any  help would be much appreciated.
> 
> Thank you in advance!
> 
>  Julian  Villegas, Ph.D.
> http://julovi.net
> 
> 
> Me pregunto de un modo pensativo
> Que  significa ser Colombiano?
> No se le respondi. Es un acto de  fe
> JLB.
> 
> 
> 
>       
> 
> _______________________________________________
> Pd-dev mailing  list
> Pd-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
> 


      



More information about the Pd-dev mailing list