L-I-V / MQL-Tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with compiling mqh files.

RenIfx opened this issue · comments

commented

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.

commented

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

commented

Sorry MQH

image

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.

commented

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