L-I-V/MQL-Tools

Problem with compiling mqh files.

RenIfx opened this issue · 4 comments

Hello. Problem with compiling mqh files. The files are not compiled. An error pops up.
In the metaeditor everything compiles fine.

image

image

I wrote as it is written in the recommendation, but it did not help.

L-I-V commented

What is this 'mh4' file?
Can you provide a screenshot with the first line of the editor and the file name?

Sorry MQH

image

L-I-V commented

What are you trying to achieve by compiling the ‘.mqh’ file? Just to clarify, compiling a ‘.mqh’ file does not result in an executable file, unlike the compilation of a ‘.mq5’ file. Files with the ‘.mq4.mq5’ extension contain the source code of an expert or an indicator, which must be compiled into an executable file. Files with the ‘.mqh’ extension contain shared functions and constants that can be used in other files.

When you compile a ‘.mqh’ file in MetaEditor, it simply checks for syntax errors.
If you want to check a file with the ‘.mqh’ extension for syntax errors, you can use the Ctrl+Shift+Z shortcut or click the corresponding button.

If you want to compile the ‘.mq5’ file that includes the ‘.mqh’ file without switching to the ‘.mq5’ file tab, you can insert the name of the ‘.mq5’ file in the first line of the ‘.mqh’ file (for example: //###<Experts/Examples/MACD Sample.mq5). This will allow the compiler to automatically find the ‘.mq5’ file and use it during compilation.

Now I understand everything.
Please excuse me.
Thanks a lot for your works and your helps.