engOpen fails on Mac with "matlab: command not found"
Show older comments
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?
Answers (2)
David Chassin
on 2 Jul 2012
1 vote
Walter Roberson
on 2 Jul 2012
0 votes
Odd, in OS-X (Leopard), I find /bin/expr and /usr/bin/awk .
Is your C++ program possibly fiddling with your PATH environment variable?
Categories
Find more on Call MATLAB from C in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!