compiling - metaeditor.exe help

 

Hi,

I am compiling from the command line. Created a few EA's some time ago. Now I am revisiting some of my projects but I cannot for the life of me find any documentation on the available command line switches/flags/options/arguments/parameters.

I know about the /compile, /inc, /log switches, but is there a way to specify the output/build directory?

But before I can worry about that, the problem now is that it does not compile and I get no output when running:

metaeditor.exe /compile:"path\to\my_ea.mq4" /inc:"path/to/MQL4"

Even if I change the arguments to some bogus values, there is no error. metaeditor.exe just exits without doing anything. The ui launches just fine when run without arguments.

I saw this post: https://www.mql5.com/en/forum/155846, but I don't know if that is still relevant, and those links are only MT installers, not standalone compilers as far as I can tell.

Command line to compile MQ4 source code with metaeditor.exe
Command line to compile MQ4 source code with metaeditor.exe
  • 2015.06.11
  • www.mql5.com
The Metaeditor help states you can run a compiler downloadable from:•https://download.mql5.com/cdn/web/metaquotes.software.corp/mt5/mql...
 
HelloNatalya: I am compiling from the command line. Created a few EA's some time ago. Now I am revisiting some of my projects but I cannot for the life of me find any documentation on the available command line switches/flags/options/arguments/parameters.
Integration with other IDEs - MetaEditor Help
Integration with other IDEs - MetaEditor Help
  • www.metatrader5.com
MetaEditor allows you to write code not only in MQL4 and MQL5. You can also edit and compile the C++ and Python source code. In addition, you can...
 
Thank you. Any idea why the compiler does not do anything or output anything?
 
HelloNatalya #:
Thank you. Any idea why the compiler does not do anything or output anything?

Have you found any solutions? I would love to know how to compile from the command line. Vscode mqltools is able to do it, so I know it is possible. The only problem with mqltools is that it makes it impossible to use c++ intellisense.

 
Lane Henslee #:

Have you found any solutions? I would love to know how to compile from the command line. Vscode mqltools is able to do it, so I know it is possible. The only problem with mqltools is that it makes it impossible to use c++ intellisense.

Maybe this works:

https://www.mql5.com/en/forum/36616#comment_5840681

Compile using console command?
Compile using console command?
  • 2014.10.01
  • www.mql5.com
Is there any console command that can compile the mq5 file? For example: "mql5 -compile ./strategy101.mq5 ./strategy101...
 
Carl Schreiber #:

Maybe this works:

https://www.mql5.com/en/forum/36616#comment_5840681

I found a great simple solution by reading the source code for mqltools.


All I need is to make this simple file I call compilemql.ahk and convert it to an executable. I wonder why the /compile flag does nothing.

Run, metaeditor
Sleep, 1000
Send, {F7}
 
Wow, thanks for sharing the solution!
Reason: