Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
Alexander
Alexander el 16 de Sept. de 2015
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?

Respuestas (0)

Categorías

Más información sobre Deploy to C++ Applications Using mwArray API (C++03) en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by