Page 1 of 1

libmysql.dll loading error - only one computer, others fine

Posted: 27.07.2022, 01:08
by svtdoug
I have written a db app using Delphi 10.4 Community and Zeos db components, client server using MySQL 8.0.27 server. I have this app running on 5 computers as clients on the same local network. The issue is: I have set up a new computer which I set up identical to the other clients, but when I try to connect app to DB, I get the "libmysql.dll found, but could not be loaded. Check compile-target and library compatibility!" msg. The app is compiled as a 32bit app, the libmysql.dll is the 32bit version. All computers are running Windows 10 64bit OS. Nothing is different on the new computer that I can detect. I can even try to run the app on new computer across the network from another computer's exe folder and get the same error. My application's zConnection1.LibraryLocation is set to the apps exe folder, and that is where the dll resides on all computers. The only libmysql.dll on the problem computer is the one in the app's exe folder.

Then as a test I compiled my app in 64bit, and using the 64bit version of libmysql.dll. This runs fine on development machine, but I get the same error on new computer. Yes, I have tripled checked that the app and libmysql.dll are same bitness. Now it gets interesting, on one of the client machines which runs the 32bit app fine, when I attempt to run the 64 bit app, I get the same load error. So my issue seems to be propagating! At least another data point. I've tried disabling virus & firewall, running app as administrator, but no joy. BTW, I am using Zeos 7.2.14- stable release. Hate to upgrade without knowing the cause, unless there's been fix.

Thanks much for any ideas!
Doug

Re: libmysql.dll loading error - only one computer, others fine

Posted: 27.07.2022, 10:53
by miab3
Hi,

Some dlls may be missing from the system. For example something from Microsoft. Check what libraries are used by the application on the computers it runs on.

MichaƂ

Re: libmysql.dll loading error - only one computer, others fine

Posted: 27.07.2022, 12:34
by Fr0sT
Likely MSVC Runtime dependency in libmysql...
General approach to solving issues:
1. Develop the link graph of all the components involved
2. Remove nodes one by one until only one remains (that will be the reason) or the issue is gone (the node you've just removed will be the reason)
Here the graph is: Your app => Zeos => libmysql => some other libs, OS libs => OS. Start by removing "Your app => Zeos" replacing it with "Your test app"

Re: libmysql.dll loading error - only one computer, others fine

Posted: 27.07.2022, 15:25
by marsupilami
You might want to check if all necessary dependencies of libmysql.dll are installed using the dependencies tool from https://github.com/lucasg/Dependencies