Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Matlab builder NE / MCR on Windows 8

Tags:

c#

.net

wpf

matlab

I have compiled some matlab functions using Matlab R2012a into .net DLL files. and everything is working as it should. i am using WPF/C# .net 4.5 on windows 7 64bit and my program works ok.

however we are now transferring and testing our program on windows 8 pro. we have a problem in runtime - we are using of course MCR R2012a in order to run the .dll files. we can't load the classes or functions in win8 and our program crashes.

have anyone came across this problem? will it help if we will compile the functions using Matlab R2013a?

like image 947
Gilad Avatar asked Jul 25 '13 15:07

Gilad


Video Answer


1 Answers

The solution to the matlab problem with windows 8 is to add

[assembly: MathWorks.MATLAB.NET.Utility.MWMCROption("-nojit")]

in the assembly file.

I do not know why this works. nojit- means no just in time compiler which creates binary file.

however when I have added this. it worked on windows 8 x64 as well. with the same MCR

like image 74
Gilad Avatar answered Sep 20 '22 07:09

Gilad