What do I do to use sqlite3 with OSX? lazarus / 15-macOS - Mac OS X ---------------------------------------------------------------------- luigi65 · 2009-02-12 13:38 Due to failure to work with Zeoslib (see my post http://forum.lazarus.freepascal.org/index.php/topic,6290.0.html), now I try with sqldblaz package (under 'lazarus/component/sqldb'). But I have others problems to use with sqlite, I have dropped a TSQLite3Connection  component on a new form, but when I run the application I obtain an error (see attached image). So I examine the source code and I see in '/lazarus/fpc/2.2.2/source/packages/sqlite/src/sqlite3.inc' file this code at row 27: Code: [Select]... const {$IFDEF WINDOWS}   Sqlite3Lib = 'sqlite3.dll'; {$else}   Sqlite3Lib = 'libsqlite3.so'; {$endif} ... My system is: Mac OSX 10.5.4 XCode 3.0 Lazarus 0.9.26 Zeoslib 6.6.4 So I suppose that is not possible to use SQLDBLaz package with OSX because the source code try load libsqlite3.so and not the file libsqlite3.dylib used in OSX, do you think this is right or wrong? Thanks ---------------------------------------------------------------------- Phil · 2009-02-12 14:59 I haven't used sqlite but I think this problem has been reported before. Long-term solution: Please report this as a bug. At the very least there needs to be documentation on how to use sqlite on OS X. Short-term solution: If you include the sqlite3dyn unit in your app, it looks like it will load the library dynamically rather than declaring it external. Then you can pass in the path to your .dylib in the InitialiseSQLite call. I'm not at my Mac right now, but I believe the sqlite.dylib is included on all Macs and will always be in /usr/lib - check that to make sure - my memory isn't what it used to be. Thanks. -Phil ---------------------------------------------------------------------- Loesje · 2009-02-12 15:56 This problem is fixed in fpc 2.2.3. You could try a snapshot or fpc 2.2.4rc1. ---------------------------------------------------------------------- luigi65 · 2009-02-13 10:42 I have looked for fpc 2.2.3 snapshot or 2.2.4rc1 for Mac OSX, but I have not found any, I see only fpc-2.2.2.intel-macosx.dmg. Could you tell me where I find it or download from? Thanks ---------------------------------------------------------------------- Vincent Snijders · 2009-02-13 12:45 ftp://ftp.hu.freepascal.org/pub/fpc/beta/2.2.4rc1/i386-macosx/ or ftp://ftp.hu.freepascal.org/pub/fpc/beta/2.2.4rc1/powerpc-macosx/ ---------------------------------------------------------------------- luigi65 · 2009-02-13 14:13 Thank you very much. I have also downloaded this ftp://ftp.hu.freepascal.org/pub/fpc/beta/2 .2.4rc1/source/fpc-2.2.4rc1.source.zip for the sources, is it right? ---------------------------------------------------------------------- Vincent Snijders · 2009-02-13 15:49 That's right.