【发布时间】:2019-12-23 13:48:47
【问题描述】:
我在 macOS 10.14.5 的 MATLAB 2019a 上运行 glmnet 包。我还在我的笔记本电脑上安装了 Xcode。
我收到如下错误:
Invalid MEX-file '/Users/Desktop/Research/Paper Code/glmnet/glmnetMex.mexmaci64' : dlopen(/Users/Desktop/Research/Paper Code/glmnet/glmnetMex.mexmaci64,
6): Library not loaded: @loader_path/libmex.dylib
Referenced from: /Users/Desktop/Research/Paper Code/glmnet/glmnetMex.mexmaci64
我已经尝试了代码mex -setup并得到了
MEX configured to use 'Xcode with Clang' for C language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB variables with more than 2^32-1 elements.
In the near future you will be required to update your code to utilize the new API.
You can find more information about this at: http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
我从mathworks 找到了一些针对mex 的建议,但我不确定这是否能解决我的问题。我在这里停了下来,因为我不确定我是否应该按照这个答案删除一些东西。
有什么想法吗?
【问题讨论】:
-
您能否确定,您的路径中没有空格。例如。 《纸条码》
-
您自己构建了 MEX 文件还是预编译了它?
-
路径中的空格可以; Matlab 和 DLL 加载程序正确处理了这个问题,并且这个问题在没有空格的路径上重现。
-
好问题!包含指向实际库的链接、系统信息和收到的确切错误消息会很有帮助。如果您还包括您运行的产生该错误消息的确切代码,这将很有帮助,以使回答者更容易重现该问题。 (我可以使用 Glmnet 中的示例代码轻松地做到这一点,但并不是每个问题都能以这种方式解决。)
-
@CrisLuengo 是预编译好的。