How to package MEX files with linked libraries?

조회 수: 5 (최근 30일)
Bruce Elliott
Bruce Elliott 2016년 1월 20일
댓글: Yuebin Zhou 2016년 1월 22일
I've developed a set of MEX files that I'd like to distribute to coworkers for use on an isolate network. I compiled them on Windows using the C++ compiler in MS Visual Studio 2010, and I've found that the MEX files rely on a number of .dll files that come with the MS VS installation.
Is there a best practice for packaging the .mex files along with any necessary .dll files? I could try to determine all the dependencies manually and then search for the files to copy them, but if the packaging tool can do that for me, that would probably be a better way to do it.
  댓글 수: 1
Yuebin Zhou
Yuebin Zhou 2016년 1월 22일
This should be possible. You can try the procedure below.
1. Open deploytool from MATLAB.
2. Select ' Application Compiler' in order to create an executable.
3. Add the main file for your application. This is the main M-file that needs to be compiled.
4. In the 'Files installed with your application' section, please add the required dll files.
5. Now you can Package the application.
6. When the deployment process is complete a file explorer opens and displays the generated output. It should contain three directories: for_redistribution, for_testing, for_redistribution_files_only
7. Please navigate to the for_redistribution directory. This contains the executable that you can distribute. It will first install the application and place the dll files in the installed application directory. As a result, executing the application will pick up the correct dll files.
Please also note that if any dll file needs to be registered, then you may probably register it manually.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by