Error when importing Library File (.mq4 is not 32-bit version)

Back to topics list To post a new topic, please log in or register
avatar
8
dionikolo 2016.05.25 16:05
 

Hi guys! 

I wrote some functions to a Library File and when i run the strategy tester error occurred, see the pic below

:Picture

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

 

avatar
1197
FMIC 2016.05.25 16:41 #
 

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.

avatar
8
dionikolo 2016.05.25 18:09 #
 
FMIC:

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? 

avatar
1197
FMIC 2016.05.25 18:34 #
 
dionikolo:

One more question. Can i import library file in to library file? 

Yes!
Back to topics list  

To add comments, please log in or register