SQlite compilation error

Hello guys

I’m trying to implement SQLite in my app (https://github.com/bolav/fuse-sqlite) but it cannot compile correctly. The project gives this error when trying to build:

C:\Users\User\Desktop\example\test_sqlite\SQLiteImpl.CIL.uxl(3,11): E0000: Failed to load assembly ‘C:\Users\User\Desktop\example\test_sqlite\SQLiteImpl.CIL.dll’: Unable to find file. (Eccezione da HRESULT: 0x80070002) C:\Users\User\Desktop\example\test_sqlite\SQLiteImpl.CIL.uno(8,30): E0000: ‘SQLiteImpl.OpenImpl(string)’ is marked as ‘extern’, but target does not provide an implementation C:\Users\User\Desktop\example\test_sqlite\SQLiteImpl.CIL.uno(11,28): E0000: ‘SQLiteImpl.ExecImpl(string,string)’ is marked as ‘extern’, but target does not provide an implementation C:\Users\User\Desktop\example\test_sqlite\SQLiteImpl.CIL.uno(14,28): E0000: ‘SQLiteImpl.CloseImpl(string)’ is marked as ‘extern’, but target does not provide an implementation C:\Users\User\Desktop\example\test_sqlite\SQLiteImpl.CIL.uno(17,55): E0000: ‘SQLiteImpl.QueryImpl(string,string)’ is marked as ‘extern’, but target does not provide an implementation

It seems that the dll file is not found…but where/how can I get it? Thank you Max

Did you run the cil_compile.sh? Probably not since you are on Windows. You need to compile the Preview support to a DLL. Please try to run mcs -r:System.Data -target:library -r:Mono.Data.Sqlite.dll SQLiteImpl.CIL.cs .

I’m only on OSX and have not programmed mono on Windows. If you cannot compile it on Windows I will try to compile it, and supply it, and then we can check if that works.

Hello Bjorn Yes I’m on windows.

I have tried your command from prompt but system cannot find mcs. Have searched myself also, no trace on the HD :wink: Max

Hi Max,

Put this file in the directory and tell me if it works:

https://www.dropbox.com/s/8hhummb1657lgv8/SQLiteImpl.CIL.dll?dl=0

Dear Bjorn

now compilation is completed, but as soon as the app is started the following runtime error appears (it cannot find the assembly specified):

ERROR: Impossibile caricare il file o l’assembly ‘Mono.Data.Sqlite, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756’ o una delle relative dipendenze. Impossibile trovare il file specificato. System.IO.FileNotFoundException occured. at Fuse.Reactive.CrossThreadExceptionHandler.CheckAndThrow() in C:\ProgramData\Uno\Packages\Fuse.Reactive\0.17.5\$.uno:line 1533 at Fuse.Reactive.JavaScript.HandleWorkerException() in C:\ProgramData\Uno\Packages\Fuse.Reactive\0.17.5\$.uno:line 1573 at Fuse.UpdateListener.Invoke() in C:\ProgramData\Uno\Packages\FuseCore\0.17.5\$.uno:line 6392 at Fuse.UpdateManager.Update(Stage stage) in C:\ProgramData\Uno\Packages\FuseCore\0.17.5\$.uno:line 6613

Hi Bjørn-Olav Strand

Until recently, my app was working fine reading my bundled SQLite file. Now it is accessing the one created on ~/.local/share/ when I use local preview despite using var db = sqlite.openFromBundle(‘xxxx.sqlite’); In other words, it creates ~/.local/share/xxxx.sqlite when I use local preview.

What could have changed to affect this or is there something that I need to review in the app code?