フィルターのクリア

How create DLL using only C/C++ types?

1 回表示 (過去 30 日間)
Alexander
Alexander 2015 年 9 月 16 日
Library Compiler Application create DLL with MatLab type mwArray (for C++, and mxArray for C):
extern LIB_libcfit_CPP_API void MW_CALL_CONV cfit2(int nargout, mwArray& u, const mwArray& x);
My trading robot (MQL4/5 language of www.metaquates.net) can't use functions from DLL with such types. So I create function for robot (working in Metatrader 4):
__declspec(dllexport) int __cdecl Cfit(double* px, int N)
{
mwArray mwx(N, 1, mxDOUBLE_CLASS);
mwx.SetData(px, N);
mwArray u;
cfit2(1, u, mwx);
double result[1];
u.GetData(result, 1);
return static_cast<int>(result[0]);
}
Could you show a simple example (steps) how to create (using MatLab and/or Visual Studio) DLL for Metatrader?

回答 (0 件)

カテゴリ

Help Center および File ExchangeDeploy to C++ Applications Using mwArray API (C++03) についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by