[Mono-osx] upgrade sqlite3.dll to a custom build
severedcross at gmail.com
Mon Feb 21 22:23:23 EST 2011
On Feb 21, 2011, at 2:59 PM, Paulo Silva wrote:
> I'm new to Mono, and I follow the direction on this post, but I still have
> problems. So, some help will be appreciated.
> My Mono Version is 2.10
> I follow this steps:
> Compile the new SQLite version on Mac OS X 10.6.6:
> - CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA" ./configure --disable-shared
> - make
> - make install (install in the /usr/local/lib and /usr/local/bin)
> So, at this point I have two SQLite Version in /usr/bin and /usr/local/bin
> In my Mono Web Project in the "bin" folder I put the System.Data.SQLite.dll
> (SQLite-22.214.171.124 managedonly binaries) and create the
> System.Data.SQLite.dll.config width the following content:
> <dllmap dll="sqlite3" target="/usr/local/lib/libsqlite3.0.dylib"
> I'm doing this because, I'm using the DbProviderFactory.
> But I still have an error when executing the project.
> The Error:
> System.DllNotFoundException: /usr/local/lib/libsqlite3.0.dylib
> at (wrapper managed-to-native)
> So, please can anyone help-me solve this issue.
> View this message in context: http://mono.1490590.n4.nabble.com/upgrade-sqlite3-dll-to-a-custom-build-tp1548569p3318012.html
> Sent from the Mono - OSX mailing list archive at Nabble.com.
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
In all likelihood, your libsqlite is compiled 64-bit, while Mono is 32-bit on all OS X platforms. Thus, it can't load the libsqlite binary. Either compile it as a fat binary with both 64-bit and 32-bit arches, or compile it for 32-bit only (should be as simple as adding -m32 to CFLAGS).
Hope that helps,
More information about the Mono-osx