# MATLAB window question

**URL:** <https://mworks.discourse.group/t/matlab-window-question/724>\
**Category:** Support\
**Created:** [July 20, 2010, 3:47pm UTC](https://mworks.discourse.group/t/matlab-window-question/724 "2010-07-20T15:47:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [July 20, 2010, 3:47pm UTC](https://mworks.discourse.group/t/matlab-window-question/724/1 "2010-07-20T15:47:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [July 20, 2010, 4:01pm UTC](https://mworks.discourse.group/t/matlab-window-question/724/2 "2010-07-20T16:01:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [July 21, 2010, 10:42pm UTC](https://mworks.discourse.group/t/matlab-window-question/724/3 "2010-07-21T22:42:37Z")

</div>

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

Mark

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [July 19, 2022, 11:58pm UTC](https://mworks.discourse.group/t/matlab-window-question/724/4 "2022-07-19T23:58:28Z")

</div>


