1

I am a bit confused about the sqlite3.dll in Mono. I just wonder have Mono for Android and MonoTouch already provided the unmanaged binary of the native C sqlite3 by default?

So I can do this in my code already with zero dependency?

[DllImport("sqlite3", EntryPoint = "sqlite3_open", CallingConvention=CallingConvention.Cdecl)] public static extern Result Open ([MarshalAs(UnmanagedType.LPStr)] string filename, out IntPtr db);

Or I need to add something before I can use above code?

Ramon Chan
  • 93
  • 1
  • 5

2 Answers2

1

For MonoTouch it is iOS who provides the native sqlite3 library, so you should be able to invoke the native methods as you suggested.

For Mono for Android I do not know.

Update

For Mono for Android this seems like it would help you: https://stackoverflow.com/a/4945737/183422

Community
  • 1
  • 1
Rolf Bjarne Kvinge
  • 19,253
  • 2
  • 42
  • 86
  • I guess so since the guy who made sqlite-net originally targeted iOS. For MonoDroid, do I need to add something on top, I don't know. – Ramon Chan Sep 12 '12 at 10:06
0

I have confirmed that there is no extra coding or dependencies. SQLite-net just works like a charm on MonoDroid.

Either Android or MonoDroid already provides native sqlite3 C++ library.

Ramon Chan
  • 93
  • 1
  • 5