Redistributable differences for 32 bit / 64 bit

조회 수: 2 (최근 30일)
Kristian
Kristian 2013년 10월 25일
답변: Kristian 2013년 10월 29일
Hello, I'm using matlab to create a .net assembly of my matlab code. I'm distributing this by copying my generated assembly along with mwarray.dll into the same folder as the application which will use it. When the application starts and it fails to load the assembly, the user is directed towards the correct MCR runtime (r2013a 32 bit or r2013a 64 bit depending on the current application mode). This all works fine on 64 bit systems. On 32 bit systems, the generated assembly will not load. I have analysed both the generated assembly and mwarray.dll and they were both built as 'Any CPU'.
So, am I supposed to use a different mwarray.dll for 32 bit systems? Am I supposed to build my .net assembly in both 32 AND 64 bit versions of matlab?
Thanks.

채택된 답변

Kristian
Kristian 2013년 10월 29일
After some experimenting, I can conclude that you must use the mwarray.dll specific to the 'bittyness' of the application you are running. To get both versions of mwarray.dll, I installed both versions (32 bit / 64 bit) of either the MCR or matlab. If you analyze the mwarray.dll assembly, it's been built as "Any CPU". Don't let that fool you - you need the correct bit version.
You don't need to build your NE Builder .net assembly in both 32 and 64 bit versions of Matlab NE Builder. I'm building with 64 bit matlab and it works on 32 bit systems.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Deploy to .NET Applications Using MWArray API에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by