After reviewing a couple of alternative IDEs/Source Code Editors that could be used to code and compile in MQL5 instead of using the original Metaeditor IDE, I decided to go with Visual Studio Code, from Micros
在脚本中调用此函数: #import'Project2.dll'voidSamplesW(string& pChar);#importvoidOnStart() {stringt ='Hello from MQL5';SamplesW(t);Print('SamplesW(): ', t); 将收到以下预期消息: SamplesW(): Hello from MQL5 Hello from C 现在编辑函数调用: #import'Project2.dll'voidSamplesW(string& p...
这应该是 Visual Studio 2017 在构建函数库后会执行的操作列表。 将以下行添加到此列表内: xcopy '$(TargetDir)$(TargetFileName)' 'E:\...\MQL5\Libraries\' /s /i /y 此处您应指定相应终端文件夹的完整路径来替代 ”...“。 成功构建函数库后,您的 DLL 将被复制到指定的文件夹。 在这种情况下,“...
在函数库代码生成期间,Visual Studio 2017 形成了以下宏: #ifdef PROJECT2_EXPORTS #define PROJECT2_API __declspec(dllexport) #else #define PROJECT2_API __declspec(dllimport) #endif 所需函数的完整原型如下所示: PROJECT2_API int fnExport(wchar_t* t); 在函数库编译之后查看导出表: 若要查看它,请...