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?
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.
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