
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I tried from other drive (e:/) still getting that error. Moreover, I used codeblocks to generate the dll, along with the dll a file (.def) is also generated, but even putting them in libraries along with .def gives 127 error ? someone please help.
1. Don't use _stdcall when writing with Code::Block
2. There's dll sample in MT installation located at experts/samples
I am receiving the following error message
Cannot call function "xxx" from DLL " xxx" (error 127)
This is a commercial indicator (not EA). I have run the indicator successfully on 2 of my computers with WinXP. A third WinXP computer gives me this error message. The DLL file is in the experts/library folder. I'm not sure what else could be the cause of this error.
Any solution or ideas would be greatly appreciated.
Had a same issue on VS2010. The names of exported functions were changed and thus was getting the 127 error.
The reason is that dllexport of a C++ function will expose the function with C++ name mangling. If C++ name mangling is not desired, either use a .def file (EXPORTS keyword) or declare the function as extern "C". http://msdn.microsoft.com/en-us/library/3y1sfaz2%28v=vs.100%29.aspx
The correct function declaration (.def not needed) looks like this:
extern "C" __declspec(dllexport) int square(int i)
{
return i * i;
}
Regards and good luck