Download MetaTrader 5

Sample EA doesn't work in strict mode on MT4 build 604

To add comments, please log in or register
Searching on MQL5.community is performed in all sections. Try it!
tadashi kishimoto
8
tadashi kishimoto 2014.02.10 12:34 

Hi,

This EA doesn't work in strict mode on MT4 build 604.

ea.mq4

#property strict
#include <inc.mqh>
void OnTick() {
    MyCalculator(1, 2);
}

inc.mqh

#property strict
#import "lib.ex4"
int MyCalculator(int value,int value2);
#import

lib.mq4

#property library
#property strict
int MyCalculator(int value,int value2) export {
    return(value+value2);
}

There are some error messages in Journal.

2014.02.10 21:29:37.999 2013.01.02 08:00 Testing pass stopped due to a critical error in the EA
2014.02.10 21:29:37.999 2013.01.02 08:00 unresolved import function call
2014.02.10 21:29:37.999 2013.01.02 08:00 Cannot find 'MyCalculator' in 'lib.ex4'

Why doesn't it work?

tadashi kishimoto
8
tadashi kishimoto 2014.02.12 14:05  

I got it.

ea.mq4
#property strict
#include <inc.mqh>
void OnTick() {
    MyCalculator(1, 2);
}

inc.mqh

#property strict
int MyCalculator(int value,int value2) {
    return(value+value2);
}
To add comments, please log in or register