DYLD_LIBRARY_PATH

조회 수: 16 (최근 30일)
Saba Hajhassan
Saba Hajhassan 2023년 5월 30일
답변: Varun 2023년 12월 27일
I am totally a beginner in programming and Matlab.
I have a big trouble to open a FMU file on Matlab Simulink, sicne the "DYLD_LIBRARY_PATH" is missing on my macOS.
I want to work by adding variable "DYLD_LIBRARY_PATH", I do not know how to launch MATLAB by command line in the terminal added variable "DYLD_LIBRARY_PATH".
--------------------------------------------------------------------------------------------
I also found this on Mathwork, but I have no idea hot to implement it:
Use the Exported Tool-Coupling FMU
The exported FMU requires a local installation of Simulink to run. The MATLAB version used for cosimulation must be the same as the MATLAB version where the FMU is exported. On Windows®, the application that runs the FMU can check out the required licenses automatically. For other operating systems, apply these settings:
  • On Mac OS:setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:<InstallationFolder>/bin/maci64:<InstallationFolder>/extern/bin/maci64 (csh/tcsh)
  • export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:<InstallationFolder>/bin/maci64:<InstallationFolder>/extern/bin/maci64 (bash)
--------------------------------------------------------------------------------------------
Could anyone please tell me how I can add it to my macOS via terminal or better said how to launch MATLAB with added variable "DYLD_LIBRARY_PATH, step by step?
Thanks!
  댓글 수: 1
Walter Roberson
Walter Roberson 2023년 5월 31일
Unfortunately, as of El Capitan, under some conditions DYLD_LIBRARY_PATH is ignored for security reasons.
The official documentation since then has implied that the security reasons should not apply to MATLAB or Simulink, but in practice many people have found that this security "feature" does apply to MATLAB and Simulink (at least when installed in the default locations under /Applications ) .
When this problem is occuring, the work-arounds are not straight-forward... not unless you are willing to disable System Integrity Protection.

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

답변 (1개)

Varun
Varun 2023년 12월 27일
Hi Saba,
Looks like you want to know step by step how to launch the MATLAB after setting up "DYLD_LIBRARY_PATH" environment variable.
Please follow below steps:
1) Open the Bash Terminal application on your macOS. To open it, open the Launchpad app. Type in "terminal" and click "Terminal".
Alternatively, you can find it in the Applications > Utilities folder.
2) Know the folder where the MATLAB is installed. Usually, the MATLAB is in the Applications folder, you might use:
/Applications/MATLAB_R20XXx.app/bin
3) Use the "export" command to set the "DYLD_LIBRARY_PATH" variable as shown below:
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/Applications/MATLAB_R20XXx.app/bin/maci64:/Applications/MATLAB_R20XXx.app/extern/bin/maci64
Make sure to replace "R20XXx" with your MATLAB version.
4) Launch the MATLAB from same terminal:
/Applications/MATLAB_R20XXx.app/bin/matlab
These steps should help you launch the MATLAB with DYLD_LIBRARY_PATH env. variable being set on macOS.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by