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.
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!

Postby M56OBER » 11.04.2017, 20:49

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: 909
Joined: 11.05.2012, 12:32
Location: Poland

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

Postby miab3 » 11.04.2017, 21:33

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!

Postby M56OBER » 11.04.2017, 21:39

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!

Postby M56OBER » 11.04.2017, 21:40

in win32 it's work fine

marsupilami
Gold Boarder
Gold Boarder
Posts: 573
Joined: 17.01.2011, 14:17

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

Postby marsupilami » 12.04.2017, 17:59

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: 909
Joined: 11.05.2012, 12:32
Location: Poland

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

Postby miab3 » 12.04.2017, 22:04

@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!

Postby M56OBER » 13.04.2017, 09:28

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!

Postby M56OBER » 13.04.2017, 09:30

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
Gold Boarder
Gold Boarder
Posts: 573
Joined: 17.01.2011, 14:17

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

Postby marsupilami » 13.04.2017, 11:10

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: 909
Joined: 11.05.2012, 12:32
Location: Poland

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

Postby miab3 » 13.04.2017, 18:06

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!

Postby M56OBER » 14.04.2017, 13:05

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!

Postby M56OBER » 16.04.2017, 17:31

Hi,

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

Thank you


Return to “ZeosLib 7.1 stable Forum”

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest