Redistributable differences for 32 bit / 64 bit

6 views (last 30 days)
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.

Accepted Answer

Kristian
Kristian on 29 Oct 2013
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.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!