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

No WinUser32.mqh in MT5 x32 #8

Closed aisurfer closed 6 years ago

aisurfer commented 6 years ago

Hi! I use MT5 x32 on Linux under wine and there is no WinUser32.mqh in Include dir So I have to comment it eval sed -i "s/#include\ \<WinUser32.mqh>/\\/\\//" "$MT_DIR"/MQL5/Include/Mql/Lang/Native.mqh and then compilation works good.

aisurfer commented 6 years ago

Maybe to create some install scripts for different systems with automated patches? I have following script (Ubuntu Linux, wine32, MT5 x32) that installs mql-zmq to fresh mt dir https://gist.github.com/surfindominator/49ebdb23dabf2d71c95c21cc593c21e3

dingmaotu commented 6 years ago

For this specific case, we can fix the problem by the __MQL5__ predefined macro (conditionally include WinUser32.mqh or a custom one) or by putting Win32 specific code to a separate file so that the dependency is clearer. I prefer the later (so the Win32 dependency will be gone in mql-zmq) and I will try to fix this in mql4-lib and import the changes here.

But your idea to create installers or install scripts for different systems is good. fxblue has a solution for creating EA installers for windows, and your script is good start for a linux installer. I will look into these and add installers for this project. Thanks for the suggestion.