To use a library you have to use the "#import" directive with the ".ex4" file, not the ".mq4" file.
You can also prepare a Library Header file ".mqh" to define the functions being exported in the library as well as do the actual import for you, and then simply included it at the top of your code with the "#include" directive.
PS! Also, when using "strict" mode, remember to explicitly use the "export" post-modifier in the library to make the functions available outside the library.
To use a library you have to use the "#import" directive with the ".ex4" file, not the ".mq4" file.
You can also prepare a Library Header file ".mqh" to define the functions being exported in the library as well as do the actual import for you, and then simply included it at the top of your code with the "#include" directive.
PS! Also, when using "strict" mode, remember to explicitly use the "export" post-modifier in the library to make the functions available outside the library.
Ohhh.... what a fool i am... Thank you FMIC for the quick reply.
One more question. Can i import library file in to library file?
One more question. Can i import library file in to library file?
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi guys!
I wrote some functions to a Library File and when i run the strategy tester error occurred, see the pic below
:![Picture Picture](https://c.mql5.com/mql4/forum/2016/05/errorlibrary_1_small.jpg)
When i use Include Files it works perfect. But for some reason to work with library seem a better solution for large EA that i work for.
I run win10 64-bit version system.(Maybe the problem is there...)
So how can i solve that problem? \
Thanks in advance!!!