Hello,
I'm having an issue where compiling a .mq5 file from the command line (MetaEditor64.exe /compile:<path> /log:compile.log) silently fails without generating an .ex5, no errors and no logged issues. I stumbled upon this issue whilst using Visual Studio Code in combination with the MQLTools extension.
This only occurs when:
- A large number of modular .mqh files are included.
- The program constructs several deeply nested objects inside OnInit().
- Singleton-based utility wrappers are used (e.g., inline CClass* Class(void){ return(Class::Instance()) } ).
- When I comment out object construction in OnInit(), the exact same file compiles successfully.
- This failure is silent — no errors, no warnings, no .ex5. Only the list of included files appears in the log.
What I tried:
- Removing all inline keywords.
- Ensuring no path issues or syntax errors.
- Verifying same file compiles fine from MetaEditor GUI.
- Increasing TimeToMiniTerminal in MetaEditor settings to "compile MQL file using script". When using the script; the terminal opens, starts compiling, then closes before it finished compiling.
Request:
- Please clarify whether there is a known complexity/memory/symbol limit in MetaEditor CLI.
- If possible, can the CLI version be updated to:
- Report a proper error when compilation aborts silently?
- Or document the limits for inline/constructs/symbols/includes?
This issue seems related to parser/stack exhaustion and reminds me of deep #include chain behaviour in C++ without compiler paging.
Having some visibility into these limits or a diagnostics mode for the CLI would help me, and I'm sure a handful of others, tremendously.
Thank you!
- Compile using console command?
- Can't open include mqh file or Libraries
- Integration with other IDEs - Welcome to algorithmic trading
Winged Trading:
your issue reads like you should be sending a msg to both support and post below the release version of your mt4/5 thread.
But without an example of code that you know will replicate the issue, how can you expect any response? This is a technical forum after all.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register