I have created a program (GUI) on MATLAB 7.6 (2010a) and compiled it using depoytool. however, when I try to run the program, it complains about a missig library file (libmwmclmcrrt.so.7.6). I have installed MCR, and I am trying to point to it by typing the filename followed by the path to the MCR, but nothing is working.
Suggestions?
On linux, MATLAB creates the startup script called run_progname.sh. You should run this script, and not your compiled program directly. Assuming you are in the directory where the program progname is compiled, execute
./run_progname.sh <deployedMCRroot> args
Related
I'm trying to automate mac terminal calls in MATLAB. In my specific use case I used brew to install cmake but in MATLAB cmake isn't recognized [~,result] = system('cmake ..'); returns zsh:1: command not found: cmake
Using the following I am pretty sure I could update the path so that cmake is recognized.
(Mac,Matlab,bash) Changing the PATH of bash in Matlab for system commands
However, I was wondering if there was a generic way of mimicking the path that the terminal is seeing.
In particular when I run env in the terminal and in MATLAB using [~,result] = system('env'); the path variables are different and I'm wondering why that is and how to ensure they align.
When you start MATLAB from its icon on macOS, you never ran the login shell startup files, so most of your configuration is not loaded. That is, anything configured in ~/.zprofile, ~/.zshrc, etc. is not seen by MATLAB. Unlike other Unixes, macOS doesn’t start a login shell when you log on. See here for the differences between a login shell and a non-login shell.
One way around this is to launch MATLAB from a terminal window. Another way is to manually load the zsh configuration before running your shell command.
A cleaner solution is to avoid ~/.zprofile (loaded for login shells) and ~/.zshrc (loaded for interactive shells), and instead put your configuration in ~/.zshenv (loaded for all shells, including the one started by MATLAB for system() or !).
In particular, Homebrew adds a line
eval "$(/opt/homebrew/bin/brew shellenv)"
to your ~/.zprofile file. Moving this line to ~/.zshenv and restarting MATLAB should add the Homebrew configuration to shells started from within MATLAB.
I am creating a OS kernel in C, C++ and assembly. I am developing on a installed Eclipse CDT IDE on my Ubuntu 16.04 LTS machine. I am searching about run configurations in eclipse, but it seems to be that it is used for executing application binaries. My OS kernel is not a normal binary that can be executed under Linux. It must be emulated using software like QEMU and Bochs.
My Makefile uses the command q to run the kernel inside QEMU after building its components:
make q
Using the build configuration, I can make Eclipse build the kernel by executing the following command in a bash shell:
make Build
How can I create a run configuration in Eclipse so that it can run the kernel after building it? Currently, I have to type in the terminal window to run the kernel, or create an alterative build configuration to run the kernel, even if I click the build button.
After a long time, I have found the solution to this problem. The thing is that your kernel is not a normal C++ application. Eclipse can only execute the app in the context of the already running operating system. You need to make a launcher program that executes things on your behave or runs a script to run the kernel.
Well, since you use a makefile, you could just run the make program directly. Its binary may be stored in usr/bin/make.
In your run configuration, pass the location of your makeprogram as the C++ application's path. In addition to this, add the arguments given to the C++ application, including -
RunCommand - The command in the makefile that runs your kernel.
-f/path/to/makefile - The make program needs to know where your Makefile is because it is being executed by a absolute path (usr/bin/make).
-I/path/to/project-dir - The make program must also switch the current working directory to your project directory so that the commands work.
I have a bash script and I want to execute it from Matlab 2014b in Ubuntu 14.04. When I launch it from terminal (that I start from os) everything is ok. I try to launch it from Matlab like this
!./script.sh
It executes but cannot open image files that have to be loaded.
More than that if I launch terminal window from Matlab
!./gnome-terminal
and use it to launch the script I got the same 'file not found' problem. Text files are accessed with no problem. Path to the images are global. To load images opencv library is used. My guess is that for some reason opencv works different from Matlab, but I don't know what to do.
I spend a lot of time to figure out the problem, but still cannot resolve it. I will appreciate any advise or help.
LD_LIBRARY_PATH of Matlab shell differs from one of teminal shell. Following command in Matlab:
setenv('LD_LIBRARY_PATH', <content of LD_LIBRARY_PATH from terminal>)
solves the problem.
Content of LD_LIBRARY_PATH from terminal is printed by
echo $LD_LIBRARY_PATH
I am having trouble running mono CLI commands inside the msysgit console. It works fine in the windows command prompt added by the Mono installer. I have paid attention to the path env variable in the mono command prompt and added C:\Program Files (x86)\Mono\bin\; to the beginning of my system path (and restarted msysgit).
I am getting the following error when trying to run xbuild:
/c/Program Files (x86)/Mono/bin/xbuild: line 2: cygpath: command not found Cannot open assembly 'xbuild.exe': No such file or directory.
What am I missing from msysgit to help mono's CLI tools work better?
Mono for windows is built with cygwin + mingw (see Mono compile guide).
I'm not sure whether it's fully compatible with msys or not. From the error, I guess there is a problem of path. You may need cygpath.exe in your path from the following link. You should probably invoke mono either from Cygwin or cmd (through the bat provided files).
Even if mono for windows is compiled with mingw (and thus should not depend on cygwin), from your error, we can see there are still cygwin dependencies.
On ccl on mac os x 10.9 i am having a problem cretaing executables.
(save-application "/full/path/to/saved-app" :prepend-kernel t) double clicking the produced executable file enters on terminal showing very long errors starting with a one like error: problems loadiing bundle:can't determine class name and ending with the kernel debugger options.
On ccl on windows i simply define a function and do the same above to save executable, later i can double click the output file it runs and remembers my defined function, ccl on mac dont remember also when i save image and load it to kernel manually.
on the clisp side, it creates executable on my mac, and on some widows installations it creates executable but i cannot launch executable, it gives an error prompt window saying something like
application failed to start because libreadline6.dll not found.
restarting application may solve the problem
but don't.
What are the problems here, any solutions?
The message says that the DLL cannot be found.
So, unless the OS is lying to us (which I wouldn't put past it, alas) the solution is
locate libreadline6.dll
add that directory to PATH or move/copy/link libreadline6.dll to a directory which is in PATH
or run your new image with an augmented PATH (either by creating an application shortcut or by running from the command line PATH=/path/to/libreadline6.dll:$PATH /my/new/lisp/image)