dingmaotu / mql-zmq

ZMQ binding for the MQL language (both 32bit MT4 and 64bit MT5)
Apache License 2.0
544 stars 298 forks source link

Still getting "Cannot load 'libzmq.dll' [126]" error #18

Closed doobedoobedoo closed 6 years ago

doobedoobedoo commented 6 years ago

Hey, sorry to raise the issue again even though it was solved (for some) before.

Even after using all the fixes provided in the previous threads (installing visual C++ 2015 + checking that &key[32] below #define SOCKOPT_CURVE_KEY(KeyType,Macro) is changed to uchar &key[] in SocketOptions.mqh) but I still get the same "Cannot load 'libzmq.dll' [126]" error. Anybody having the same problem or a fix ??

Thanks so much!!

dingmaotu commented 6 years ago

Hi, I always suggest the following procedure:

  1. Check the version of your MT4/MT5. For MT4, you need 32bit DLL; for MT5, you need to determine if it is a 32bit or 64bit version. Keep them consistent.
  2. Check if you have the Visual C++ 2015 runtime installed: you need 32bit Visual C++ runtime if you are using MT4 or 32bit MT5, and 64bit Visual C++ runtime if you are using 64bit MT5.
  3. Check if you have both libzmq.dll and libsodium.dll put in your Libraries folder
doobedoobedoo commented 6 years ago

Thanks a lot for your answer! Indeed it was a 32/64 bit dll issue: I moved the libzmq.dll and libsodium.dll libraries to the SysWOW64 folder of my computer, now it works! This thread helped me understand as well https://www.mql5.com/en/forum/122992