Why does Matlab set a custom LD_LIBRARY_PATH when execting "system" on Linux?

5 ビュー (過去 30 日間)
Richard Crozier
Richard Crozier 2015 年 3 月 6 日
回答済み: Walter Roberson 2016 年 7 月 25 日
Why does Matlab set the LD_LIBRARA_PATH environment variable of the shell in which it executes "system" commands on Linux?
I can understand setting this for matlab's own use, but for commands executed on the system, surely you want them to be executed using the system libraries. I only discovered this because I was finding my commands failing with cryptic errors referencing paths in the Matlab installation directory.
Is there any way to control the behviour?

採用された回答

Walter Roberson
Walter Roberson 2016 年 7 月 25 日
MATLAB uses system() to invoke its own utilities such as mex(), so it needs to have the right LD_LIBRARY_PATH set up for those, and those utilities need to be accessible to scripts that the user invokes.

その他の回答 (1 件)

Rob Campbell
Rob Campbell 2016 年 7 月 25 日

カテゴリ

Help Center および File ExchangeCall MATLAB from C についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by