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?
- 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
:
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!!!