Download MetaTrader 5

How to link a dynamic library coded in C++

To add comments, please log in or register

Hi, I'm new to MQL and would like to know if this is the correct way to import my dll.

THe function coded in C++ is...

bool UnicodeToAscii(const wchar_t * szUnicode, char * szAscii)

And my import declaration in MQL4 is...

#import "Analytical.dll"
bool UnicodeToAscii(const string szUnicode, char szAscii);

My Metatrader 4, however, keeps saying...

2016.10.25 16:56:05.197 Dulcimer EURUSD,M1: unresolved import function call
2016.10.25 16:56:05.197 Cannot call 'Analytical.dll::UnicodeToAsciiAnalytical', 'Analytical.dll' is not loaded
2016.10.25 16:56:05.196 Dulcimer EURUSD,M1: 47.85421124950359
2016.10.25 16:56:05.024 Cannot load 'C:\Program Files\MetaTrader 4\MQL4\Libraries\Analytical.dll' [193]
2016.10.25 16:55:58.754 Expert Dulcimer EURUSD,M1: loaded successfully
2016.10.25 16:55:58.754 'C:\Program Files\MetaTrader 4\MQL4\Libraries\Analytical.dll' is not 32-bit version

Any ideas what could be the problem?

Ex Ovo Omnia
Ex Ovo Omnia  

As far as I can see, the reason is printed out:

Analytical.dll' is not 32-bit version 

To add comments, please log in or register