POCO SQLite example on OS X or Linux?

I’m wanting to use what seems to be the POCO SQLite library that is compiled on my OS X version of OF, but I’m having some problems with it, especially when following the POCO documentation available here: http://pocoproject.org/docs/00200-DataUserManual.html

First, it seems as if the SQLite headers are not included with the distribution, so I had to pull them from a separate download of the POCO lib, but I’m not sure if the most up-to-date POCO lib matches the lib being used for OF. Second, when I take the tutorial code of a simple SELECT and try and apply it to one of my own databases, I receive a “libc++abi.dylib: terminating with uncaught exception of type Poco::NotFoundException: Not found” error, which I believe indicates that the table is not found (although it is in the database as evidenced through a sqlite3 command-line query).

So my question is really this: can anyone point me to code, e.g. on github, that they have written that successfully uses the distributed POCO SQLite wrapper distributed with OF? Or instructions for how to incorporate a separately-compiled lib into their OF environment? I’d just like to confirm that someone has made this work before I decide to just use the plain C sqlite library.

1 Like

For those of you who had read this: I gave up on using POCO and went back to using ofxSQLite. (I was never able to get POCO to work the way I wanted it to.) The github version of ofxSQLite wouldn’t compile directly, and I realized that it’s because of some incomplete code in ofxSQLiteSimpler.cpp and ofxSQLiteSimpler.h. Once removed, ofxSQLite compiled on my system, albeit with a number of slightly troubling warnings (comparisons done at 32bits instead of 34, etc). But ofxSQLite does work for me, at least with very simple SELECTs, which is all I needed.

Hey there, I might also recommend https://github.com/bakercp/ofxSQLiteCpp.

I did a bunch of work to update ofxSQLite the other day but found a lot of bugs with pointer and memory management that quickly caught up with me.

https://github.com/bakercp/ofxSQLiteCpp works great and is basically a set of examples for use with https://github.com/SRombauts/SQLiteCpp.

Thanks so much! I’ll check that out.

1 Like