Building portable MEX files
Mostrar comentarios más antiguos
Hi. My question is how to build MEX files that are portable using the Matlab Coder?
The problem: I can build a MEX file, using Visual Studio C++ Express from auto generated (by Matlab Coder) C code that can run on my system with no problems, but when I try to run it on a different system, without Matlab Coder, I cannot run it even after installing the Visual Studio redistributeable files. The error code I get is: "Invalid MEX file: specific module cannot be found".
The by far optimal solution: I have actually looked deeper into this and found, using DependencyWalker, that a number of DLL files are required in order for the MEX file to run. If they are not present in the system path, or working directory, the MEX file cannot run and gives the above error code.
Can anyone comment/aide on this?
Sincerely, Tobias Elmøe
Respuesta aceptada
Más respuestas (3)
Tobias Elmøe
el 12 de Jul. de 2011
1 voto
4 comentarios
Friedrich
el 12 de Jul. de 2011
Thats a good question and I really don't know it. Please post the answer you got from MathWorks because I think other users could have the same question and looking for an answer
Tobias Elmøe
el 12 de Jul. de 2011
Friedrich
el 12 de Jul. de 2011
Thanks for posting
Tobias Elmøe
el 29 de Jul. de 2011
Alexander Bottema
el 12 de Jul. de 2011
0 votos
Hi Tobias, Do you know what DLLs are missing? When you say that you try to run it on a different system, does this mean that MATLAB is installed (but not MATLAB Coder)? Or do you mean that MATLAB itself is not installed? Thanks, Alexander
1 comentario
Tobias Elmøe
el 12 de Jul. de 2011
Friedrich
el 12 de Jul. de 2011
0 votos
Hi,
please contact MW Technical Support for this. It seems that ML Coder is not made for deplyoing your mex functions to other ML users.
I think the Technical Support can tell you more about this.
(Simply copying the missing DLLs will violate the license agreement)
3 comentarios
Tobias Elmøe
el 12 de Jul. de 2011
Friedrich
el 12 de Jul. de 2011
It really looks like that it is not made for deploying. The MCR provides these DLLs which your mex file is missing. So writing a wrapper function and compiling it into an exe should work fine. But I think there is no easy way to deploy the mex file only.
Contact the Support and mention these two internal numbers: g730952 and g613886 (this should speed things up)
Tobias Elmøe
el 12 de Jul. de 2011
Categorías
Más información sobre Introduction to Installation and Licensing 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!