从 C++ dyld 调用 MATLAB:库未加载错误

Calling MATLAB from C++ dyld: Library not loaded error

我正在尝试 运行 在 http://www.box.net/shared/xmazi14uv2 找到的以下示例。

但是当我制作并尝试 运行 可执行文件时,我遇到了以下错误:

./demo
dyld: Library not loaded: @rpath/libeng.dylib

我在网上搜索没有成功。我 运行正在 MATLAB_R2014b 使用 MacBook Pro Air。

我不使用甚至无法访问 Mac,但我认为当您 运行 使用 MATLAB 引擎的应用程序时需要设置一些环境变量:

export PATH='/path/to/MATLAB_R2014b.app/bin':$PATH

export DYLD_LIBRARY_PATH='/path/to/MATLAB_R2014b.app/bin/maci64:/path/to/MATLAB_R2014b.app/sys/os/maci64':$DYLD_LIBRARY_PATH