Page 1 of 1
Not Working On Mac - Cannot Load Client Library sqlite3.dll
Posted: Fri 18 Jan 2013 13:44
by DespatchSystems
Hi,
All working on PC, as soon as I connect TSQLConnection on Mac I get error "Project dylib raised exception class Exception with message 'Cannot load client library: sqlite3.dll'"
I have all the recommended dylib files from instructions on my deployment setup.
I have latest libsqlite3.dylib from xcode SDK.
Does it work for you with latest release?
Please help.
Greg
Re: Not Working On Mac - Cannot Load Client Library sqlite3.dll
Posted: Fri 18 Jan 2013 14:23
by AlexP
Hello,
Please specify the IDE you are using: XE2 or XE3?
Re: Not Working On Mac - Cannot Load Client Library sqlite3.dll
Posted: Fri 18 Jan 2013 15:01
by DespatchSystems
Delphi XE3 Professional, checked the deployment in the PA scratch directory on OSX and it has the recommended files deployed:
libcgunwind.1.0.dylib
libdbexpsqlite40.dylib
libmidas.dylib
libsqlite.dylib
Re: Not Working On Mac - Cannot Load Client Library sqlite3.dll
Posted: Mon 21 Jan 2013 13:48
by AlexP
Hello,
Try to specify the names of the used libraries explicitly in the following way:
Code: Select all
var
SQLConnection: TSQLConnection;
begin
SQLConnection := TSQLConnection.Create(nil);
try
SQLConnection.ConnectionName := 'Devart SQLite';
SQLConnection.DriverName := 'DevartSQLite';
SQLConnection.Params.Values['LibraryName'] := 'libdbexpsqlite40.dylib';
SQLConnection.Params.Values['VendorLib'] := 'libsqlite3.dylib';
SQLConnection.Params.Values['DataBase'] := 'test.db3';
try
SQLConnection.Connected := True;
except
on E:Exception do
ShowMessage(e.Message);
end;
finally
SQLConnection.Free;
end;
end;
Re: Not Working On Mac - Cannot Load Client Library sqlite3.dll
Posted: Mon 21 Jan 2013 17:03
by DespatchSystems
Hi Alex,
It is working now, thanks.
I have a TSQLConection in a datamodule, the libraryname and vendorlib default to the windows settings at designtime. Setting libraryname and vendorlib programmatically using a compiler conditional define before connection did the trick.
{$IFDEF MSWINDOWS}
SAUserData.Params.Values['LibraryName'] := 'dbexpsqlite40.dll';
SAUserData.Params.Values['VendorLib'] := 'sqlite3.dll';
{$ENDIF}
{$IFDEF MACOS}
SAUserData.Params.Values['LibraryName'] := 'libdbexpsqlite40.dylib';
SAUserData.Params.Values['VendorLib'] := 'libsqlite3.dylib';
{$ENDIF}
Perhaps for a future version of your driver, you could detect when running on a Mac with windows LibraryName & vendorlib and autocorrect to the Mac settings at runtime? You may gets lots of support cases with other developers making the same mistake as I have.
Thanks for your help,
Greg
Re: Not Working On Mac - Cannot Load Client Library sqlite3.dll
Posted: Tue 22 Jan 2013 10:14
by AlexP
Hello,
This behaviour (incorrect setting of these properties depending on a platform) is due to changes in Delphi XE3. We are investigating this problem at the moment and will probably fix the behaviour of our products, if it is possible.