Creating a Stand Alone App for a Matlab GUI
조회 수: 1 (최근 30일)
이전 댓글 표시
I would like to be able to create .dll, .h, and .lib files that I can use and call from MS Visual C++ 6.0. At this point I have made a Matlab GUI which uses several .m and .fig files. I have also used the Matlab compiler and the command:
mcc –B cpplib:new_file_name file1.m file1.fig file2.m
to create a C++ shared library that has .dll, .h, and .lib files and I have successfully called "file 1" from MS Visual C++ in a Win 32 Console Application. However, when I call "file 1" in the C++ program, there is a long delay before my MATLAB GUI opens. I believe this is because during this time, the MATLAB license had to be accessed. Therefore, I need a different way of compiling my Matlab code into a .dll, .h, and .lib format that can be used in another program without ever having to use the MATLAB license. Another option for me is if there is some sort of way (using visual C++ or MATLAB) to see if the MATLAB license is actually being used when I run my C++ program that calls the MATLAB GUI. (If my gui is in fact being run without the MATLAB license then I don't have a problem and the long delay is being caused by some other reason.) Thanks for any help.
댓글 수: 0
채택된 답변
Walter Roberson
2013년 11월 6일
No, executables built with the MATLAB Compiler do not need the license to be checked (at least not for the base product.)
However, when you build something with the MATLAB Compiler, the time to start it up will be almost exactly the same as it would take to start up MATLAB itself. MATLAB Compiler uses the same threaded interpretion mechanism that MATLAB itself uses.
If you need something that loads faster, then you need to use MATLAB Coder. However, MATLAB Coder is not able to generate code for any graphic elements.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!