Page 1 of 1
libmysql50.dll found but can not be loaded Check compile Target et library comptability!
Posted: 11.04.2017, 20:49
by M56OBER
hi!
I have an Error in XE6 Win64 application with Zeos 7.1.4 TZconnection
[libmysql50.dll found but can not be loaded Check compile Target et library comptability!]
have you ever seen this problem and have you a solution ?
br
Olivier
Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!
Posted: 11.04.2017, 21:33
by miab3
Check compile Target et library comptability!
Michal
Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!
Posted: 11.04.2017, 21:39
by M56OBER
Ok for compatibilty
but where i can find libmysql50.dll or similar for win64 XE6 application
Olivier
Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!
Posted: 11.04.2017, 21:40
by M56OBER
in win32 it's work fine
Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!
Posted: 12.04.2017, 17:59
by marsupilami
Hello Olivier,
check the mysql site for a Win64 C-Connector if you want to do 64 Bits Applications.
With best regards,
Jan
Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!
Posted: 12.04.2017, 22:04
by miab3
@M56OBER
but where i can find libmysql50.dll or similar for win64 XE6 application
In MySQL Win64 distribution.
Michal
Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!
Posted: 13.04.2017, 09:28
by M56OBER
Hi,
I have always this error
[img]
Erreur.jpg
[/img]
i have donwloading the win64 dll from Mysql C-Connector page and unzip in my librairies path Librairies\win64\
my code
{$IFDEF WIN64}
ShowMessage('64bits');
ZConnection1.LibraryLocation := ExtractFilePath(Application.ExeName)+'Librairies\win64\libmysql.dll';
ZConnection1.Connected := True;
{$ENDIF}
{$IFDEF WIN32}
ShowMessage('32bits');
ZConnection1.Connected := True;
{$ENDIF}
Have you try to connect to mysql in win64 taget compil with succes?
br
Olivier
Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!
Posted: 13.04.2017, 09:30
by M56OBER
my Zconnection parameters
object ZConnection1: TZConnection
ControlsCodePage = cCP_UTF16
Catalog = ''
HostName = 'localhost''
Port = 3306
Database = 'dosoc'
User = 'root'
Password = '''
Protocol = 'mysql-5'
Left = 48
Top = 24
end
Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!
Posted: 13.04.2017, 11:10
by marsupilami
Hello Olivier,
I don't see anything set for the LibraryLocation property. Please put the correct library there, like 'C:\Program Files\MySQL\Connector-C\libmysql.dll' - or whatever is correct for your setup.
If you get the exception that the library was found but could not be loaded that basically means exatly that - Zeos couldn't load the library and doesn't know why. The wrong bitness is just a guess. It could be that the library has the wrong bitness - but it also could be that the library failed to load because of missing dependencies like other DLLs. Maybe you want to check these things with the dependency walker.
With best regards,
Jan
Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!
Posted: 13.04.2017, 18:06
by miab3
At me:
Code: Select all
procedure TForm1.FormShow(Sender: TObject);
begin
{$IFDEF WIN64}
ZConnection1.LibraryLocation := ExtractFilePath(Application.ExeName)+'..\..\cconnector64\libmysql.dll';
{$ENDIF}
{$IFDEF WIN32}
ZConnection1.LibraryLocation := ExtractFilePath(Application.ExeName)+'..\..\cconnector32\libmysql.dll';
{$ENDIF}
ZConnection1.Connected := True;
end;
it works without any problem (Delphi XE2 32/64; ZEOS 7.3 svn 3986).
Michal
Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!
Posted: 14.04.2017, 13:05
by M56OBER
Thank you Miab3
i'll install this version and i'll inform you after
Olivier
Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!
Posted: 16.04.2017, 17:31
by M56OBER
Hi,
It's work fine with Zeos 7.3.0-alpha and LibMariaDB.dll 64bits
Thank you