Monday, January 26, 2009

Matlab: Compile m file in Matlab 7.4 on Mac X

I tried to compile one simple m file - get_pad_load.m (see previous post).
First, when I tried to use mcc -m test.m I got error dyld: Library not loaded: ../../bin/maci/libmwcompiler.dylib
Referenced from: /Applications/MATLAB74/bin/maci/mcc
Reason: image not found
Trace/BPT trap


To repair it I indicated paths to missing libraries export DYLD_LIBRARY_PATH="/Applications/MATLAB74/bin/maci:/Applications/MATLAB74/sys/os/maci"
This worked. I was able to compile my file, and run it from console as an executable.