Using loadlibrary in deployed application on computer without matlab
이전 댓글 표시
I need to load a dll using loadlibrary in a deployed GUI application. I have created a .m file to use the calllib function in a deployed application as recommended.
To get the application to work as deployed on even my computer (with Matlab installed) I had to run mex -setup and select the Lcc-win32 C 2.4.1 compiler. The application now runs fine on my computer but when I need to run it on a computer not running Matlab and not with the Lcc-win32 C compiler selected it fails.
How can I get around this?
댓글 수: 1
Geoff
2012년 5월 2일
Have you installed the MCR on your target machine? It is required to run deployed apps.
Are you able to provide a more descriptive account of the issue instead of "it fails"?
답변 (4개)
Walter Roberson
2012년 5월 2일
0 개 추천
Which MATLAB version are you using, on which OS? You are using the 32 bit version of MATLAB, right? And the target system, which OS version is it? Have you installed MCR on the target system?
Kaustubha Govind
2012년 5월 2일
0 개 추천
If you are already using the prototype file (.m) for LOADLIBRARY, you don't need to have a C/C++ compiler installed. Try running your application from a command window (as opposed to simply double-clicking on the icon), and see what error is reported.
Krishan
2012년 5월 2일
댓글 수: 3
Philip Borghesani
2012년 5월 2일
I expect this error is caused by the dll you are loading not being properly installed on your deployed computer. Did you copy the library you are using or install it on the second computer? Are there other requirements to use this library?
Walter Roberson
2012년 5월 2일
Did you bundle the library with the .exe ? If so then is the directory that the .exe unbundles into on the search path for dll file? MCR_CACHE_ROOT
http://www.mathworks.com/matlabcentral/answers/36794-mex-file-error-when-code-called-from-web-server
Krishan
2012년 5월 2일
Krishan
2012년 5월 3일
0 개 추천
댓글 수: 1
Kaustubha Govind
2012년 5월 3일
Perhaps a web search will help. For example: http://blogs.msdn.com/b/junfeng/archive/2006/04/14/576314.aspx
카테고리
도움말 센터 및 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!