How to use installed mcr on Linux system

조회 수: 62 (최근 30일)
bill
bill 2020년 12월 21일
편집: Kojiro Saito 2020년 12월 22일
I am trying to compile a program on our Linux system for other to use without needing Matlab. The mcr
was installed to the location shown below but I can't figure out how to point to it when running the
Application compiler. It seems to be looking for a .zip file
/usr/apps/matlab/R2019a/v96/mcr/toolbox> ls
bioinfo database econ fininst matlab mps optim risk simbio textanalytics
compiler datafeed finance globaloptim mpc nnet pde shared stats trading

답변 (1개)

Kojiro Saito
Kojiro Saito 2020년 12월 22일
편집: Kojiro Saito 2020년 12월 22일
In development machine where MATLAB and MATLAB Compiler is installed
As of R2020b, MATLAB Compiler does not support OS cross compile, so you need to use MATLAB on Linux if the target machine is Linux.
  1. Open Application Compiler app.
  2. Specify m files in Main File panel.
  3. If you want to include MATLAB Runtime in your package, check "Runtime included in package" radio button.
If MATLAB cannot fine MATLAB Runtime installer (.zip file), a pop up window appears.
You can select "Download from Web" or "Specify Location".
This is the location of installer (.zip file) and not an installed path.
You can download the installer from the following.
By MATLAB command,
compiler.runtime.download
By web browser.
In target machine
  1. Install the package and MATLAB Runtime.
  2. Set MATLAB Runtime path to LD_LIBRARY_PATH. As described in this document.
setenv LD_LIBRARY_PATH mcr_root/version/runtime/glnxa64:mcr_root/version/bin/glnxa64:mcr_root/version/sys/os/glnxa64:mcr_root/version/sys/opengl/lib/glnxa64
where mcr_root is the location of MATLAB Runtime (ex, /usr/local/MATLAB/MATLAB Runtime/v99).
3. Run the execution file.
./yourapp arg1 arg2
or, if you skipt the previous 2 (LD_LIBRARY_PATH), you can use run_xxx.sh script with specifying MATLAB Runtime path.
./run_yourapp.sh /path/to/MATLAB_Runtime arg1 arg2

태그

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by