libmysql50.dll found but can not be loaded Check compile Target et library comptability!

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Post Reply
User avatar
M56OBER
Fresh Boarder
Fresh Boarder
Posts: 20
Joined: 28.10.2005, 12:33
Location: FRANCE

libmysql50.dll found but can not be loaded Check compile Target et library comptability!

Post 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
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!

Post by miab3 »

Check compile Target et library comptability!

Michal
User avatar
M56OBER
Fresh Boarder
Fresh Boarder
Posts: 20
Joined: 28.10.2005, 12:33
Location: FRANCE

Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!

Post by M56OBER »

Ok for compatibilty

but where i can find libmysql50.dll or similar for win64 XE6 application

Olivier
User avatar
M56OBER
Fresh Boarder
Fresh Boarder
Posts: 20
Joined: 28.10.2005, 12:33
Location: FRANCE

Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!

Post by M56OBER »

in win32 it's work fine
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!

Post 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
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!

Post by miab3 »

@M56OBER
but where i can find libmysql50.dll or similar for win64 XE6 application
In MySQL Win64 distribution.

Michal
User avatar
M56OBER
Fresh Boarder
Fresh Boarder
Posts: 20
Joined: 28.10.2005, 12:33
Location: FRANCE

Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
M56OBER
Fresh Boarder
Fresh Boarder
Posts: 20
Joined: 28.10.2005, 12:33
Location: FRANCE

Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!

Post 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
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!

Post 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
miab3
Zeos Test Team
Zeos Test Team
Posts: 1310
Joined: 11.05.2012, 12:32
Location: Poland

Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!

Post 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
User avatar
M56OBER
Fresh Boarder
Fresh Boarder
Posts: 20
Joined: 28.10.2005, 12:33
Location: FRANCE

Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!

Post by M56OBER »

Thank you Miab3

i'll install this version and i'll inform you after

Olivier
User avatar
M56OBER
Fresh Boarder
Fresh Boarder
Posts: 20
Joined: 28.10.2005, 12:33
Location: FRANCE

Re: libmysql50.dll found but can not be loaded Check compile Target et library comptability!

Post by M56OBER »

Hi,

It's work fine with Zeos 7.3.0-alpha and LibMariaDB.dll 64bits

Thank you
Post Reply