Is there a way to use MWArray.DLL in a Windows Universal app?
Mostrar comentarios más antiguos
I would like to call a simple Matlab function from inside a Universal Windows Platform (C#/XAML) program. I already compiled my function into a .Net Assembly using the Matlab Compiler SDK (deploytool).
I then create a new project with the Blank Template (Windows Universal) in Visual Studio 2015 (on Windows 10).
In order to specify the input and output arrays using Matlab types, I add a reference to MWArray.DLL, which was installed with the Matlab Compiler Runtime. (C:\Program Files\MATLAB\MATLAB Runtime\v90\toolbox\dotnetbuilder\bin\win64\v2.0\MWArray.dll) I also add the namespace at the top of my program. (using MathWorks.MATLAB.NET.Arrays;)
When I try to build it, I get the following compiler error: "Cannot find type System.ApplicationException in module CommonLanguageRuntimeLibrary."
Note that this happens even before I add my own DLL, so it must have something to do with the Matlab types in MWArray.DLL, which I do not have the source code for.
It works fine when I use it in a WPF (Desktop) Application instead of a UWP (Store) app, so it must have something to do with the Windows Universal references. Where can I find more information about what this error means and how to fix it (if possible)?
Respuesta aceptada
Más respuestas (3)
Walter Roberson
el 26 de En. de 2016
1 voto
I do not know any of the details about this, but my understanding is that UWP is multi-architecture. That is a problem for MATLAB Compiler SDK because the libraries it calls upon are strictly x86 or x64 (possibly all that will be available from R2016a.) MATLAB Compiler SDK and MATLAB Compiler use the same underlying technology: they call into an OS- and architecture- dependent set of binaries.
It would be possible for Mathworks to create a UWP compatible Compiler SDK, I think, but there are some hidden complexities, such as getting working and efficient LAPACK and BLAS for each of the target architectures. Already there has to be differences between what is provided for Intel CPUs and AMD CPUs, and those differences sometimes cause problems and do lead to numeric differences in round-off. And getting the graphics support right...
It might happen, but I would not expect it to work yet; I would not expect it for R2016a either (and I say that as someone who has not looked at the R2016a preview at all.)
1 comentario
D. du Toit
el 28 de En. de 2016
Bill Scott
el 17 de Jul. de 2017
0 votos
is there any update on UWP application compatability using 2016b or 2017 versions of matlab?
1 comentario
Walter Roberson
el 17 de Jul. de 2017
For the reasons I listed above about architecture, I would not expect this to be possible for some time.
Sergio
el 10 de Ag. de 2023
0 votos
Is there any update on this for 2023a or 2023b?
Categorías
Más información sobre Deploy to C++ Applications Using mwArray API (C++03) en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!