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
Not Working On Mac - Cannot Load Client Library sqlite3.dll
-
- Posts: 14
- Joined: Tue 24 Jul 2012 10:45
Re: Not Working On Mac - Cannot Load Client Library sqlite3.dll
Hello,
Please specify the IDE you are using: XE2 or XE3?
Please specify the IDE you are using: XE2 or XE3?
-
- Posts: 14
- Joined: Tue 24 Jul 2012 10:45
Re: Not Working On Mac - Cannot Load Client Library sqlite3.dll
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
libcgunwind.1.0.dylib
libdbexpsqlite40.dylib
libmidas.dylib
libsqlite.dylib
Re: Not Working On Mac - Cannot Load Client Library sqlite3.dll
Hello,
Try to specify the names of the used libraries explicitly in the following way:
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;
-
- Posts: 14
- Joined: Tue 24 Jul 2012 10:45
Re: Not Working On Mac - Cannot Load Client Library sqlite3.dll
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
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
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.
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.