Home > other >  Problems of calling matlab vs2019 generated DLL
Problems of calling matlab vs2019 generated DLL

Time:03-26

Compiled using vs2019 generated DLL in vs2019 console application test is normal, the code is as follows: the header file:

# # ifndef DH_H
# define DH_H

# ifdef _cplusplus
Extern "C" {
# endif//_cplusplus
_declspec (dllexport) int the add (int a, int b);
# ifdef _cplusplus
}
# endif//_cplusplus
# endif//! DH_H


Program files:
# include "Dh. H"
Int the add (int a, int b)
{
Return (a + b);
}


After using MATLAB calls:
> Loadlibrary (D1, 'Dh. H)
> Libfunctions D1 - full

No lib. D1 class methods,


Why say that there is no way to class? Consult!
  • Related