Would a moderator please respond!

 
For the life of me I can't understand why I can't get a simple .dll to compile and then work in MT4!!!

I posted on this before and while others are interested to know the answers also we have not heard anything from a moderator or other expert. My problem is that I keep getting Error 127, "cannot call function from dll." I have tried compiling the sample .dll along with .dlls provided to me by others and also my own .dll. Everything compiles fine, but it is this runtime error that keeps occuring. I have also tried compiling with MinGW and VS, just fyi.

Here is the first thread:
'Problem with .dll I'm writing'

It would be in MetaQuotes best interests to provide a little guidance here, as there seem to be numerous people interested in this issue and it would allow developers to extend the functionality of the platform. Thank you.

BW
 
Check your Settings (Ctrl+O)

 
Rosh:
Check your Settings (Ctrl+O)


Thank you for replying Rosh...I really appreciate it...but that's not the problem. I think it might be caused by C++ 'name-mangling.' Do you think this might cause this error?

BW
 
I just had this, too.  You have to add your function to the list of functions in the .def file before compiling.
 
i solved this problem on vc++ 2005 express
i had the .def file with the functions to export.
but in the project settings -> linker -> input section : module definition file i had nothing. this is why i had the error 127 all the time.
so after i put the name of the .def file .\$(SolutionName).def
it worked fine. i could call a function defined in the dll from the EA
Reason: