How to run engdemo.cpp in MAC 10.8 Mountain Lion in MATLAB R2013a?
8 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2013 年 6 月 4 日
編集済み: MathWorks Support Team
2025 年 9 月 29 日
I'm trying to get engdemo.cpp to work in Matlab (2013a) in Mountain Lion.I referred Matlab's tutorial but could not reach the point of getting any of the engine functions to work in Matlab.
採用された回答
MathWorks Support Team
2025 年 9 月 29 日
編集済み: MathWorks Support Team
2025 年 9 月 29 日
Please follow the below steps to execute "engdemo.cpp" in MAC terminal:
You must execute these commands with admin/root privilege from the folder where engdemo.cpp is located in your system.
1. Adding MATLAB’s path (use either setenv or export) to the environment variable path:
$ export PATH='/Applications/MATLAB_R2013a.app/bin':$PATH$ echo $PATH (verify it is added)
2. Setting DYLD_LIBRARY_PATH
$ export DYLD_LIBRARY_PATH='/Applications/MATLAB_R2013a.app/bin/maci64:/Applications/MATLAB_R2013a.app/sys/os/maci64':$DYLD_LIBRARY_PATH$echo $ DYLD_LIBRARY_PATH
3. Compiling engdemo.cpp
g++ -o engdemo_terminal engdemo.cpp -I/Applications/MATLAB_R2013a.app/extern/include/ -L/Applications/MATLAB_R2013a.app/bin/maci64 -leng -lmx -lm -lmat -lut -lstdc++
4. Execute it
$ ./engdemo_terminal
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!