Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hello everyone,
I want to tidy up my EAs and store my functions in libraries.
Example:
EA contains this:
extern int loglevel = 1;
int start() {
}
The library contains the log-Function:
void Log(int level, string txt){
}
However I get the following error when compiling the library:
'loglevel' - variable not defined C:\Programme\MetaTrader 4\experts\libraries\MainLib.mq4 (38, 15)
My question: is it possible, to use a system variable of an EA in an extern library without passing it all the time?