dingmaotu / mql-zmq

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

What is the correct file structure? #55

Closed eabase closed 10 months ago

eabase commented 3 years ago

I'm trying to run the Example "HelloWorld" code, but I keep getting errors about the correct path.

can't open "C:\Users\user\AppData\Roaming\MetaQuotes\Terminal\hash\MQL4\Include\Zmq\Zmq.mqh" include file HelloWorldClient.mq4

Currently it looks like this:

C:/Users/<user>/AppData/Roaming/MetaQuotes/Terminal/<hash>/MQL4/Include/Zmq (master)
$ tree -L 4 ./
./
├── ALIPAY.JPG
├── Include
│   ├── Mql
│   │   └── Lang
│   │       ├── Error.mqh
│   │       ├── GlobalVariable.mqh
│   │       ├── Mql.mqh
│   │       └── Native.mqh
│   └── Zmq
│       ├── AtomicCounter.mqh
│       ├── Context.mqh
│       ├── Errno.mqh
│       ├── Socket.mqh
│       ├── SocketOptions.mqh
│       ├── Z85.mqh
│       ├── Zmq.mqh
│       └── ZmqMsg.mqh
├── Library
│   ├── MT4
│   │   ├── libsodium.dll
│   │   └── libzmq.dll
│   ├── MT5
│   │   ├── libsodium.dll
│   │   └── libzmq.dll
│   └── VC2010
│       ├── x64
│       │   ├── libsodium.dll
│       │   └── libzmq.dll
│       └── x86
│           ├── libsodium.dll
│           └── libzmq.dll
├── LICENSE
├── README.md
└── Scripts
    ├── Test
    │   └── TestZmq.mq4
    └── ZeroMQGuideExamples
        ├── Chapter1
        │   ├── HelloWorldClient.mq4
        │   ├── HelloWorldServer.mq4
        │   ├── TaskEvent.mq4
        │   ├── TaskSink.mq4
        │   ├── TaskWorker.mq4
        │   ├── VersionReporting.mq4
        │   ├── WeatherUpdateClient.mq4
        │   └── WeatherUpdateServer.mq4
        ├── Chapter2
        │   ├── MSPoller.mq4
        │   ├── RRBroker.mq4
        │   ├── RRClient.mq4
        │   ├── RRWorker.mq4
        │   └── WUProxy.mq4
        └── Chapter3
            ├── RTReqBroker.mq4
            └── RTReqWorker.mq4

Is this not correct?

raulvictorrosa commented 3 years ago

No, you need to follow the instructions of the installation guide, coping the files from this repo to the respective folder of your MT source. https://github.com/dingmaotu/mql-zmq#files-and-installation

You need to copy the files and replace than respectively to the structure of your folder C:/Users/<user>/AppData/Roaming/MetaQuotes/Terminal/<hash>/MQL4/

eabase commented 3 years ago

@raulvictorrosa It would have been much easier to understand if you just posted the output of your structure with the tree command. Because to the looks of it, my shown above, is the same as yours. (I.e. What is wrong with my path?)

dingmaotu commented 10 months ago

@eabase you should copy DLLs from MT4 OR MT5 and put them directly under your Library folder.