engOpen fails on Mac with "matlab: command not found"

Asked by David Chassin on 1 Jul 2012
Latest activity Answered by David Chassin on 2 Jul 2012

When I execute engOpen(NULL) on a Mac in C++, I get "matlab: command not found". When I provide the complete path to the matlab command to engOpen(), I get "matlab: line 380: awk: command not found" and "matlab: line 396: expr: command not found".

Matlab works fine, i.e., "matlab -e" at the command prompt shows the environment.

I thought this was a problem with PATH, but if I export PATH with the Matlab bin folder included, it doesn't fix the problem.

Any ideas?

0 Comments

David Chassin

Tags

Products

2 Answers

Answer by David Chassin on 2 Jul 2012

Yes, we found a problem with the path related to cross platform compatibility. A path item was added using a semicolon (i.e., windows) instead of a colon (i.e., linux). The last item listed before it was added was the matlab bin directory so that go trashed. When we tried the direct path, that got trashed too.

Thanks.

0 Comments

David Chassin
Answer by Walter Roberson on 2 Jul 2012

Odd, in OS-X (Leopard), I find /bin/expr and /usr/bin/awk .

Is your C++ program possibly fiddling with your PATH environment variable?

0 Comments

Walter Roberson

Contact us