MATLAB window question

Hi Chris,

When I compile the latest Matlab window from git, the Client won’t load it, with this error:

2010-07-19 19:25:30.577 MWClient[59273:903] Couldn’t load bundle: The bundle “MWorksMATLABWindow” couldn’t be loaded because it is damaged or missing necessary resources.: {
NSBundlePath = “/Library/Application Support/MWorks/Plugins/Client/MWorksMATLABWindow.bundle”;
NSDebugDescription = “dlopen_preflight(/Library/Application Support/MWorks/Plugins/Client/MWorksMATLABWindow.bundle/Contents/MacOS/MWorksMATLABWindow): Library not loaded: libtbb.dylib\n Referenced from: /Applications/MATLAB/bin/maci64/libmwfl.dylib\n Reason: image not found”;
NSFilePath = “/Library/Application Support/MWorks/Plugins/Client/MWorksMATLABWindow.bundle/Contents/MacOS/MWorksMATLABWindow”;
NSLocalizedDescription = “The bundle \U201cMWorksMATLABWindow\U201d couldn\U2019t be loaded because it is damaged or missing necessary resources.”;
NSLocalizedFailureReason = “The bundle is damaged or missing necessary resources.”;
NSLocalizedRecoverySuggestion = “Try reinstalling the bundle.”;
}

Doing this works:
mambo:Applications histed$ export DYLD_LIBRARY_PATH=/Applications/MATLAB/bin/maci64
mambo:Applications histed$ /Applications/MWClient.app/Contents/MacOS/MWClient

Note that I installed only the maci64 architecture so /Applications/MATLAB/bin/maci does not exist, and I compiled the plugin only for 64-bit.

Is this a transient git thing? I can set that env variable as a workaround.

Thanks,
Mark

Hi Mark,

As you discovered, in order for the MATLAB window to work, DYLD_LIBRARY_PATH has to be set to include the location of MATLAB’s shared libraries. The proper setting is in MWClient.app/Contents/Info.plist. When you launch the application normally (either by double-clicking on it in the Finder, or from the command line with the open command), the OS reads Info.plist and sets DYLD_LIBRARY_PATH appropriately.

I assume you’re trying to launch MWClient from the command line sans open, e.g.

$ /Applications/MWClient.app/Contents/MacOS/MWClient

When you do that, the OS does not set DYLD_LIBRARY_PATH. Hence, you need to set it yourself. This isn’t something new; it applies to 0.4.4, too.

Chris

Thanks, that answers my question. Yes, I was looking for the stdout/stderr output from the Client and running it as you guessed.

Mark