[英]Error when Building Mex for Levenberg-Marquardt algorithm - says directory that exists does not exist
I'm trying to build a mex file from a Levenberg-Marquardt algorithm written in C by Manolis Lourakis ( Available here) ). 我正在尝试根据Manolis Lourakis用C编写的Levenberg-Marquardt算法构建一个mex文件( 可在此处获得 )。 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. 作者包括一个C网关功能,我设法解决了从makefile中得到的错误。 Now, when I try to build the makefile I am presented with the following error:
现在,当我尝试生成makefile时,出现以下错误:
/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'. 似乎是说/Applications/MATLAB_R2016b.app/bin/maci64,不是目录'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:
我用于生成文件的代码用于README文件中的指示:
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. 选项L的路径仅是作者提供的“ levmar”库中包含的所有文件的路径。
My OS is mac OS 10.12.1 and MATLAB version is MATLAB_R2016b. 我的操作系统是mac OS 10.12.1,MATLAB版本是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. 我也在OS X 10.11.6和MATLAB_R2015b上运行的系统上尝试过此操作,但遇到了同样的错误。
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.
这里的问题是-L选项在目录路径中使用<和>。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.