mercredi 18 février 2015

Mono + OSX + System.Data.SQLite proper build

I have an app developed on VS2008 using an SQLite database in C#. It compiles and runs fine on my Windows machine. I then run the same app under Mono on a MAC OSX machine, but I get an exception: "System.EntryPointNotFoundException: sqlite3_column_database_name".


Researching other posts on stackoverflow I found that a define is required: SQLITE_ENABLE_COLUMN_METADATA I recompiled the source of System.Data.SQLite after applying the new define to the only source file I found that used it.


The new library build still produces the exception shown above.


Question: Did I apply the SQLITE_ENABLE_COLUMN_METADATA pre-processor directive incorrectly? If so how should I have applied this? I am using the instructions from http://ift.tt/1E7kHi1 page, to build the library for Mono. I have built this library successfully before and run it with other test programs under Mono on OSX.


Here is a debug output snippet: //... Unhandled Exception: System.EntryPointNotFoundException: sqlite3_column_database_name


at (wrapper managed-to-native) System.Data.SQLite.UnsafeNativeMethods:sqlite3_column_database_name (intptr,int)


at System.Data.SQLite.SQLite3.ColumnDatabaseName (System.Data.SQLite.SQLiteStatement stmt, Int32 index) [0x00000] in :0


at System.Data.SQLite.SQLiteDataReader.GetStatementColumnParents (System.Data.SQLite.SQLiteBase sql, System.Data.SQLite.SQLiteStatement stmt, Int32 fieldCount, System.Collections.Generic.Dictionary2& parentToColumns, System.Collections.Generic.Dictionary2& columnToParent) [0x00000] in :0


at System.Data.SQLite.SQLiteDataReader.GetSchemaTable (Boolean wantUniqueInfo, Boolean wantDefaultValue) [0x00000] in :0


at System.Data.SQLite.SQLiteDataReader.GetSchemaTable () [0x00000] in :0


at System.Data.Common.DataAdapter.BuildSchema (IDataReader reader, System.Data.DataTable table, SchemaType schemaType, MissingSchemaAction missingSchAction, MissingMappingAction missingMapAction, System.Data.Common.DataTableMappingCollection dtMapping) [0x00000] in :0


at System.Data.Common.DataAdapter.BuildSchema (IDataReader reader, System.Data.DataTable table, SchemaType schemaType) [0x00000] in :0


at System.Data.Common.DataAdapter.FillTable (System.Data.DataTable dataTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, System.Int32& counter) [0x00000] in :0 //...


Thanks in advance for any help anyone can provide. Ron Follmer


Aucun commentaire:

Enregistrer un commentaire