-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot compile EA: "#import was not closed" #18
Comments
Those appear because you dont have those files on the libraries folder. |
I've checked my MT4 data folder. Inside Libraries/OTMql4 I have all that listed files (both .mq4 and .ex4). Just one thing that may cause this, I've setup my MT4 to use the data folder inside itself, not the one in Users folder. Is this a problem? |
try to use the mql4zmq.mq4 here: https://github.com/AustenConrad/mql4zmq/tree/master/examples |
hailg: we've never seen that error before but the code has not bee compiled recently; mglcampos: forget that AustenConrad code, and read in our Wiki how this code I'll try to get some time over the next couple of weeks to try recompiling with a recent Mt4. |
Hi, I'm using MT4 build 1010 (18/8/2016). I tried on both Mac (with PlayforMac) and Windows machines. Both give me the same errors as above. |
Also, can you tell me the Mt4 version that you can build successfully? I will make a try. |
Opentrading: I understood how your code fixed the AnsiToUnicode problem of Mql4 language update. But now all the messages i send with zeromq to my subscriber are going empty, I dont know why. I only receive a timestamp of the empty message. |
I also fixed the empty message problem, i just had to upgrade to the last zeromq version |
@hailg I solved the import issue by closing the import statement with another #import.
|
I'm also on Build 1010 and ran into this same problem. Appending #import to the affected files (OTLibLog.ex4, OTLibStrings.ex4, OTZmqProcessCmd.ex4, OTLibSimpleFormatCmd.ex4, OTLibJsonFormat.ex4, OTLibPy27.ex4, OTPyChart.ex4) got me past the import issue, but as-is I now have 53 "function must have a body" errors. I suspect it might be related to needing to explicitly specify each function you intend to import from an ex4 header, per: https://docs.mql4.com/basis/preprosessor/import Edit: The function-must-have-a-body errors were caused by me putting #import directly after #import "filename". Eg: #import "OTMql4/OTZmqProcessCmd.ex4" Instead of: #import "OTMql4/OTZmqProcessCmd.ex4" After moving the closing #import to the bottom of the following files, I was able to build and run OTPyTestZmqEA.mq4: Include/OTMql4: |
I installed from source (latest version). After copying all the files I saw that the libraries mq4 are compiled to ex4 successfully. However, when I try to compile the EA, I'll got these errors:
'OTMql4/OTLibLog.ex4' - #import was not closed OTLibLog.mqh 9 9
'OTMql4/OTLibStrings.ex4' - #import was not closed OTLibStrings.mqh 13 9
'OTMql4/OTLibSimpleFormatCmd.ex4' - #import was not closed OTLibSimpleFormatCmd.mqh 9 9
'OTMql4/OTLibJsonFormat.ex4' - #import was not closed OTLibJsonFormat.mqh 6 9
'OTMql4/OTZmqProcessCmd.ex4' - #import was not closed OTZmqProcessCmd.mqh 6 9
'OTMql4/ZmqSendReceive.ex4' - #import was not closed ZmqSendReceive.mqh 12 9
Anyone has the same issue like me?
The text was updated successfully, but these errors were encountered: