[Mono-osx] upgrade sqlite3.dll to a custom build

Bojan Rajkovic severedcross at gmail.com
Mon Feb 21 22:23:23 EST 2011


On Feb 21, 2011, at 2:59 PM, Paulo Silva wrote:

> 
> Hello
> 
> 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
> --prefix=/usr/local/
> - 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-1.0.66.0 managedonly binaries) and create the
> System.Data.SQLite.dll.config width the following content:
> 
> <configuration>
> 	<dllmap dll="sqlite3" target="/usr/local/lib/libsqlite3.0.dylib"
> os="!windows"/>
> </configuration>
> 
> 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)
> System.Data.SQLite.UnsafeNativeMethods:sqlite3_open_v2
> (byte[],intptr&,int,intptr)
> ...
> 
> 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
> http://lists.ximian.com/mailman/listinfo/mono-osx

Hi Paolo,

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,
Bojan


More information about the Mono-osx mailing list