Building portable MEX files
이전 댓글 표시
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
채택된 답변
추가 답변 (3개)
Tobias Elmøe
2011년 7월 12일
1 개 추천
댓글 수: 4
Friedrich
2011년 7월 12일
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
2011년 7월 12일
Friedrich
2011년 7월 12일
Thanks for posting
Tobias Elmøe
2011년 7월 29일
Alexander Bottema
2011년 7월 12일
0 개 추천
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
Friedrich
2011년 7월 12일
0 개 추천
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
Tobias Elmøe
2011년 7월 12일
Friedrich
2011년 7월 12일
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
2011년 7월 12일
카테고리
도움말 센터 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!