[Mono-osx] libsqlite3.0.dylib - SQLITE_ENABLE_COLUMN_METADATA required
d0ugmac1
d0ugmac1 at yahoo.com
Fri Jan 28 14:33:09 EST 2011
I have fought with SQLite and Mono for years now and finally things seem to
be pretty stable with Mono.Data.Sqlite. I still wish there was some actual
documentation for it...or at least a pointer saying you can pretty much any
ADO.NET docs out there!
Unfortunately the dylib version of sqlite supplied with Leopard 10.5.8 is
too old for the latest version of Mono, never mind the column metadata issue
which has been around for years.
My solution for my application is to package the dylib alongside my
application rather than replace the OS version with who knows what
consequences. I place the library file in the same folder as my production
executable.
You can easily build your own version of sqlite's library if you have the
dev tools installed. Here's an older sample command line to build a
universal binary PPC/Intel compatible library. (I just built a standard x86
version)
$ CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386"
LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch
i386" make
If that doesn't work for you, then download sqlite 3.5.X source, configure,
and tweak the resulting Makefile by adding this option
-DSQLITE_ENABLE_COLUMN_METADATA=1 with the rest of -D options (around line
40?).
Build it and look in the .libs folder. You will find something like
sqlite-3.5.4/.libs/libsqlite3.0.8.6.dylib
Copy this file into your application folder as libsqlite3.0.dylib
Your last bit is to make sure your environment has a DYLIB path set, or add
it to the command line.
Here's a shell launcher I use with my application
#!/bin/sh
DYLD_LIBRARY_PATH=/Path/to/My/SqliteDll mono MyApp.exe
HTH
D.
--
View this message in context: http://mono.1490590.n4.nabble.com/libsqlite3-0-dylib-SQLITE-ENABLE-COLUMN-METADATA-required-tp1548412p3245217.html
Sent from the Mono - OSX mailing list archive at Nabble.com.
More information about the Mono-osx
mailing list