I'm trying to build a mex file from a Levenberg-Marquardt algorithm written in C by Manolis Lourakis (Available here)). I've done a lot of searching and haven't been able to find a similar problem or a solution to this yet (lots from this forum!).
The author included a C gateway function and I've managed to solve the errors I was getting from the makefile. Now, when I try to build the makefile I am presented with the following error:
/var/folders/w6/c4f9x2qn7zb2srs97ngpvflh0000gn/T//mex_112796979375_74657:
line 2: -L/Applications/MATLAB_R2016b.app/bin/maci64: No such file or directory
Error using mex The command '/usr/bin/xcrun' exited with a return value '0'
Which seems to say that /Applications/MATLAB_R2016b.app/bin/maci64, is not a path to the directory 'maci64'. This is strange as when you follow the path, this directory is definitely there. The code I used to build the file was used as instructing in the README file:
mex -DHAVE_LAPACK -I.. -O -L</Users/martinmackinnon/Documents/MATLAB/levmar-2.6/levvy> levmar.c -llevmar -lclapack -lblas -lf2c
Where the path with option L, is just the path to all of the files included in the 'levmar' library supplied by the author.
My OS is mac OS 10.12.1 and MATLAB version is MATLAB_R2016b.
I've also tried this on a system operating on OS X 10.11.6 and MATLAB_R2015b, but get the equivalent error.
Any help would be much appreciated.
Thanks a lot.
For anybody with the same problem in the future. The problem here was the use of < and > in the directory path for the -L option.