Problem in creating C++ shared library using mingw in MATLAB Compiler SDK

2 次查看(过去 30 天)
I trying to convert simple MATLAB Script using MATLAB Compiler SDK by using "C++ Shared Library" Option
function [InDouble2, RetDouble] = MatLabCalcSum(InDouble1, InDouble2)
InDouble2 = InDouble2 + 1;
RetDouble = InDouble1 + InDouble2;
end
Compiled in Visual Studio 2013 and MinGW 5.3.
DLL which was compiled using Visual Studio compiler has proper exported function as "void MatLabCalcSum(int,class mwArray &,class mwArray &,class mwArray const &,class mwArray const &)" in the DLL and I am able to make a call from my C++ code and executes good.
But the DLL compiled in MinGW the script function exported as mangled name "_Z13MatLabCalcSumiR7mwArrayS0_RKS_S2_" which I can't call from other C++ code.
Please help me in resolving this issue.
Note: To choose a different compiler I am executing following command and selecting appropriate options
>> mbuild -setup

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler SDK 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by