problem with sqlite3.dll and cross compilation from Linux 32 to Windows 32/64 lazarus / 16-Databases ---------------------------------------------------------------------- gelinp · 2016-01-04 19:18 Hello, I'm using sqlite 3 with my graphical application. I tested it with success on my development PC with Linux Debian target and also Windows 32 target and wine executable. I can run from lazarus or directly from a terminal shell, it's OK. With wine I can test that sqlite3.dll installed into the executable directory is used by the application. Properties into object inspector are : But know I installed it into Windows seven 64 bit. My program is lunching but there is no datas, and no error message... I installed lazarus onto this windows seven post and recompile my application, but nothing else, the interface is empty of datas. The file sqlite3.dll (32 or 64 bit) is installed into the same directory as my application : Connected : false Database : data.sqlite (the name of my file for sqlite database. Same directory as the project and executable) LibraryLocation : I tested empty field or sqlite3.dll or sqlite.dll... I tested also to add code into main form create constructor, but with Linux and Wine there is no need, it's all right with object inspector properties without any code to add... What do you think about ? What else to do ? Thank you for your help. ---------------------------------------------------------------------- balazsszekely · 2016-01-04 20:24 1. Disable your AV or add your project to exclusion list 2. Run your application as admin 3. If non of the above helps try this(make sure sqlite3.dll is in the same directory as your exe): Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses dynlibs;     procedure TForm1.Button1Click(Sender: TObject);var   DllHandle: TLibHandle;begin  DllHandle := LoadLibrary('sqlite3.dll');  if DllHandle = 0 then    ShowMessage(SysErrorMessage(GetLastOSError)) else   ShowMessage('Successfully loaded');end; What is the error message? ---------------------------------------------------------------------- benohb · 2016-01-05 00:31 I have the same problem +I need an encrypted database .I used library with encryption enabled ( in directory of my application DLL+SO). the lazarus components DB used "/usr/lib/libsqlite.so.0" Instead of "./libsqlite.so" I try passing parameters to compiler to use "LoadLibrary()" Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i LOAD_DYNAMICALLY Other problems have appear  libsqlite.so of system  and  libsqlite.so of application directory loaded  at the same time  I deal directly with the sqlite3 . it is more control and less error . Deleted all components DB from my project and IDE to Avoid conflict and copy  ( /usr/share/fpcsrc/3.1.1/packages/sqlite/src/sqlite3.pp) to (./mysqlite3.pp) . Working directly with the Library  easier than lazarus components. This is my suggestion ---------------------------------------------------------------------- gelinp · 2016-01-05 14:06 I found the origine of the problem : 1. You have to erase all path into components because at run time the path for your sqlite data or library are differents. 2. If you deconnect your zeos connection the take care because lazarus deactivate also query components ! So in order to run anyware I put sqlite library into the same folder as my application and I activate all the databse comonents at run time ! Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TFormMain.FormCreate(Sender: TObject);begin    ZConnection1.Database := './data.sqlite';    ZConnection1.Connected := true;    ZQueryLesSequences.Active := true;    ZQueryLesSeances.Active := true;end;