Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Midas.dll error loading midas.dll

I have a problem when I try my app on an other computer without Delphi.

If I put midas.dll in the same folder / directory on System32 I always get error message Error loading midas.dll, but if I put midas.dll on the desktop then the error message does not appear and the application runs normally.

How to handle midas.dll so I can place it in the same folder?

enter image description here

enter image description here

like image 614
X-88 Avatar asked Sep 16 '14 20:09

X-88


Video Answer


1 Answers

Why Are You Here?

You made some changes in past few days, no, nothing special, and then you released your executable like always. All of a sudden someone informed you that the application no longer runs on their machine, but it displays an error message saying "Error Loading MIDAS.DLL"! So you googled it and you are here. (If this is not the case you can skip my answer)

What Has Happened?

Well, you have used one of TCustomClientDataSet descendants, probably TClientDataSet, and it needs Midas.DLL.

How can you fix this?

You have two options:

  1. Deploy Midas.DLL with your application.

    • Pros: Your executable remains smaller.

    • Cons: You need to get prepared for a war against a brutal army consisting of OS, anti viruses, installer makers, ..., and the midas itself (read OP's question again for an example!).

  2. Add the MidasLib unit to your project's uses clause.

    • Pros: if (not FMuslim) or (not IsRamadan) then you can get some coffee and enjoy it.
    • Cons: Your executable gets bigger (113,664 against 1,124,352 bytes for a just created console application in Delphi2010).

PM: You're right, this is not the right answer to OP's question. Yes, RRUZ has a comment up there, and yes, there's an older question with an accepted answer. But time has passed and Google still insists on this page. I'm pretty sure that such answer could help a noticeable portion of those 24k people who have visited this page during past 4 years.

like image 200
saastn Avatar answered Oct 04 '22 00:10

saastn