Download MetaTrader 5

i cannot compile controls.mq5

To add comments, please log in or register
zartan
650
zartan  

hello  

 see title ...  

i try to modify (examples)controls.mq5 in my own directory (robotB) but i can't : compile errors 

i certainly forget an include but  what ?  

 

thank's  


'CPoint' - declaration without type     Rect.mqh        37      4
'CPoint' - declaration without type     Rect.mqh        39      36
'&' - comma expected    Rect.mqh        39      42
'CPoint' - declaration without type     Rect.mqh        40      4
'CPoint' - declaration without type     Rect.mqh        42      40
'&' - comma expected    Rect.mqh        42      46
'CPoint' - declaration without type     Rect.mqh        43      4
'CPoint' - declaration without type     Rect.mqh        53      37
'&' - comma expected    Rect.mqh        53      43
'CPoint' - declaration without type     Rect.mqh        54      37
'&' - comma expected    Rect.mqh        54      43
'SetBound' - member function already defined    Rect.mqh        54      22
'CPoint' - declaration without type     Rect.mqh        67      1
'LeftTop' - member function already defined     Rect.mqh        79      13
'CPoint' - declaration without type     Rect.mqh        87      27
'&' - comma expected    Rect.mqh        87      33
'LeftTop' - member function already defined     Rect.mqh        87      13
'CPoint' - declaration without type     Rect.mqh        95      1
'RightBottom' - member function already defined Rect.mqh        107     13
'CPoint' - declaration without type     Rect.mqh        115     31
'&' - comma expected    Rect.mqh        115     37
'RightBottom' - member function already defined Rect.mqh        115     13
'CPoint' - declaration without type     Rect.mqh        123     1
'Size' - member function already defined        Rect.mqh        135     14
'Size' - member function already defined        Rect.mqh        147     13
'Size' - member function already defined        Rect.mqh        155     13
'SetBound' - member function already defined    Rect.mqh        163     13
'SetBound' - member function already defined    Rect.mqh        173     13
'CPoint' - declaration without type     Rect.mqh        183     28
'&' - comma expected    Rect.mqh        183     34
'SetBound' - member function already defined    Rect.mqh        183     13
'CPoint' - declaration without type     Rect.mqh        191     28
'&' - comma expected    Rect.mqh        191     34
'SetBound' - member function already defined    Rect.mqh        191     13
'CPoint' - declaration without type     Rect.mqh        209     24
'&' - comma expected    Rect.mqh        209     30
'CPoint' - declaration without type     Rect.mqh        229     25
'&' - comma expected    Rect.mqh        229     31
'CPoint' - declaration without type     Rect.mqh        257     28
'&' - comma expected    Rect.mqh        257     34
';' - name expected     Wnd.mqh 9       15
'CRect' - struct undefined      Wnd.mqh 23      28
'CPoint' - declaration without type     Wnd.mqh 78      33
'&' - comma expected    Wnd.mqh 78      40
'::' - unexpected token Wnd.mqh 148     10
'if' - declaration without type Wnd.mqh 152     4
'=' - illegal assignment use    Wnd.mqh 154     9
'=' - illegal assignment use    Wnd.mqh 155     9
'=' - illegal assignment use    Wnd.mqh 156     13
'if' - declaration without type Wnd.mqh 158     4
'return' - declaration without type     Wnd.mqh 161     4
'bool' - semicolon expected     Wnd.mqh 166     1
'CPoint' - declaration without type     Wnd.mqh 367     23
'&' - comma expected    Wnd.mqh 367     30
'CPoint' - declaration without type     WndContainer.mqh        39      33
'&' - comma expected    WndContainer.mqh        39      40
'CPoint' - declaration without type     WndContainer.mqh        254     32
'&' - comma expected    WndContainer.mqh        254     39
'CPoint' - declaration without type     Canvas.mqh      137     42
'&' - comma expected    Canvas.mqh      137     49
'CPoint' - declaration without type     Canvas.mqh      138     44
'&' - comma expected    Canvas.mqh      138     51
']' - declaration without type  Canvas.mqh      138     54
']' - comma expected    Canvas.mqh      138     54
'CPoint' - declaration without type     Canvas.mqh      139     38
'&' - comma expected    Canvas.mqh      139     45
']' - declaration without type  Canvas.mqh      139     48
']' - comma expected    Canvas.mqh      139     48
'CPoint' - declaration without type     Canvas.mqh      140     39
'&' - comma expected    Canvas.mqh      140     46
']' - declaration without type  Canvas.mqh      140     49
']' - comma expected    Canvas.mqh      140     49
'CPoint' - declaration without type     Canvas.mqh      141     39
'&' - comma expected    Canvas.mqh      141     46
']' - declaration without type  Canvas.mqh      141     49
']' - comma expected    Canvas.mqh      141     49
']' - declaration without type  Canvas.mqh      141     63
']' - comma expected    Canvas.mqh      141     63
'CPoint' - declaration without type     Canvas.mqh      142     34
'&' - comma expected    Canvas.mqh      142     41
']' - declaration without type  Canvas.mqh      142     44
']' - comma expected    Canvas.mqh      142     44
'CPoint' - declaration without type     Canvas.mqh      2391    34
'&' - comma expected    Canvas.mqh      2391    41
'CPoint' - declaration without type     Canvas.mqh      2398    36
'&' - comma expected    Canvas.mqh      2398    43
']' - declaration without type  Canvas.mqh      2398    46
']' - comma expected    Canvas.mqh      2398    46
'CPoint' - declaration without type     Canvas.mqh      2421    31
'&' - comma expected    Canvas.mqh      2421    38
']' - declaration without type  Canvas.mqh      2421    41
']' - comma expected    Canvas.mqh      2421    41
'CPoint' - declaration without type     Canvas.mqh      2440    32
'&' - comma expected    Canvas.mqh      2440    39
']' - declaration without type  Canvas.mqh      2440    42
']' - comma expected    Canvas.mqh      2440    42
'CPoint' - declaration without type     Canvas.mqh      2476    32
'&' - comma expected    Canvas.mqh      2476    39
']' - declaration without type  Canvas.mqh      2476    42
106 error(s), 0 warning(s)              100     1
Jian Chen
Moderator
3922
Jian Chen  

Maybe you didn't miss an include file. But there are something wrong with your "Rect.mqh" file. The "CPoint" structure is defined in that file and doesn't need additional include file. 

Could you copy and paste the first 40 lines of code of your "Rect.mqh" file? It is located at your "MQL5\Include\Controls" directory. 

From the compilation errors, I found that your "Rect.mqh" file has one more line of code comparing with my file. 

zartan
650
zartan  

compile is  OK in /examples but not in my directory (Experts/RobotB)

rect.mqh attached file 

Files:
Rect.mqh 11 kb
Jian Chen
Moderator
3922
Jian Chen  

The definition of "CPoint" structure has been commented in your file.

//ALC
//struct CPoint
//  {
//   int               x;                   // horizontal coordinate
//   int               y;                   // vertical coordinate
//  };

 

I don't know if you modified the "Rect.mqh" by yourself or my version of that file is not updated.

You may need to restore the definition of "CPoint" in the file or define the structure in your own code before including the standard controls files.

To add comments, please log in or register