<stdlib.mqh> include problem

 

Hi 

I just get a problem when i have to use <stdlib.mqh>

I import it in my code

#include <stdlib.mqh>

After compile my code its not any error about <stdlib.mqh>

In strategy tester Journal i have got these errors :

2022.11.06 11:12:03.103 compilation of 'C:\Users\XX\AppData\Roaming\MetaQuotes\Terminal\287469DEA9630EA94D0715D755974F1B\MQL4\Libraries\stdlib.mq4' failed


2022.11.06 11:12:03.103 cannot load 'C:\Users\XX\AppData\Roaming\MetaQuotes\Terminal\287469DEA9630EA94D0715D755974F1B\MQL4\Libraries\stdlib.ex4'

In that path i have stdlib.mq4 but not stdlib.ex4

I compiled my code for several times.


Any Solution?



 
Yaser Azizzadeh: I just get a problem when i have to use <stdlib.mqh> I import it in my code After compile my code its not any error about <stdlib.mqh>. In strategy tester Journal i have got these errors :

2022.11.06 11:12:03.103 compilation of 'C:\Users\XX\AppData\Roaming\MetaQuotes\Terminal\287469DEA9630EA94D0715D755974F1B\MQL4\Libraries\stdlib.mq4' failed
2022.11.06 11:12:03.103 cannot load 'C:\Users\XX\AppData\Roaming\MetaQuotes\Terminal\287469DEA9630EA94D0715D755974F1B\MQL4\Libraries\stdlib.ex4'

In that path i have stdlib.mq4 but not stdlib.ex4. I compiled my code for several times. Any Solution?

Remember that you need to also compile the "stdlib.mq4" that is in the "MQL4\Libraries" as well. Do that first and make sure there are no compilation errors.

Simply using "#include <stdlib.mqh>" in your own code is not enough.

 
Fernando Carreiro #:

Remember that you need to also compile the "stdlib.mq4" that is in the "MQL4\Libraries" as well. Do that first and make sure there are no compilation errors.

Simply using "#include <stdlib.mqh>" in your own code is not enough.

Tnx dear Fernando, I got it but when i compile stlib.mq4 its an error ( error: event handling function not found)
 
Yaser Azizzadeh #: Tnx dear Fernando, I got it
You are welcome!
 
Fernando Carreiro #:
You are welcome!
What about error(event handling function not found) when i try to compile stdlib.mq4
 
Yaser Azizzadeh #: What about error(event handling function not found) when i try to compile stdlib.mq4

Probably because you have the file in the wrong directory. I have no such error!

Don't remove it form the "Libraries" directory. Don't put it in the "Experts" or "Indicators" directory.


 
Fernando Carreiro #:

Probably because you have the file in the wrong directory.

Don't remove it form the "Libraries" directory. Don't put it in the "Experts" or "Indicators" directory.

its in "Libraries" directory. I deleted stlib.mq4 from directory once and created it again

is it(stlib.mq4) in there empty ?

 
Yaser Azizzadeh #: its in "Libraries" directory. I deleted stlib.mq4 from directory once and created it again. is it(stlib.mq4) in there empty ?

What do you mean delete it?

If you deleted how are you going to "recreate" it?

It is part of the MetaTrader 4 installation and its not supposed to be empty?

Did you keep backups?

Probably not. I've attached a copy, but please don't be so careless in the future.

Files:
stdlib.mq4  20 kb
 
Fernando Carreiro #:

What do you mean delete it?

If you deleted how are you going to "recreate" it?

It is part of the MetaTrader 4 installation and its not supposed to be empty?

Did you keep backups?

Probably not. I've attached a copy, but please don't be so careless in the future.

You are right but i did i deleted it!

I copied this file to "Libraries" directory and compiled again. its done and work without any error

So Tnx for help,I will try to be careful in future

 
Yaser Azizzadeh #: You are right but i did i deleted it! I copied this file to "Libraries" directory and compiled again. its done and work without any error. So Tnx for help,I will try to be careful in future
You are welcome!
Reason: