【发布时间】:2015-02-20 11:08:51
【问题描述】:
我正在尝试学习如何在使用 Windows 8.1 操作系统和 MATLAB R2014b 的机器上成功编译“稀疏建模软件”(SPAMS)。
我采取的步骤如下(某些部分可能是不必要的或丢失的)
第 1 步。 安装“Microsoft Visual C++ 2013 Professional”。
第 2 步。 安装“Microsoft Windows 软件开发工具包 (SDK)”。
第 3 步。 从http://spams-devel.gforge.inria.fr/ 下载“spams-matlab-v2.4-svn2014-02-18.tar”
第 4 步。 在 Windows 中使用 7-zip 解压缩。我只收到 1 个错误,但所有其他数据都未压缩。错误是这样的:
ERROR: Can not set reparse data: C:\Users\Yashar\Desktop\spams-matlab\cpp_library\spams.h
Step5:在MATLAB中,我设置编译器:
>> mex -setup C++
我收到的消息:
MEX configured to use 'Microsoft Visual C++ 2013 Professional' 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.
第 6 步。 在 SPAMS 中打开 compile.m(按照建议)并运行它。我得到的错误如下所示:
compilation of: -I./linalg/ -I./decomp/ -I./prox/ -I./dictLearn/ dictLearn/mex/mexTrainDL.cpp
Error using mex
C:\Users\Yashar\Desktop\spams-matlab\Files not found; check that you are in the
correct current folder, and check the spelling of
'C:\Users\Yashar\Desktop\spams-matlab\Files'.
Error in compile (line 391)
mex(args{:});
问题:我正在做的事情看起来很标准,但我知道学习如何处理与 MATLAB 接口代码等相关的问题需要一段时间。你能帮我吗?解决我遇到的问题并设法在我的机器上编译 SPAMS 工具箱?仅供参考,我有兴趣在此工具箱中使用 mexLasso 功能。
【问题讨论】:
-
您是否按照错误中的说明进行操作? “检查您是否在正确的当前文件夹中”。我的建议是确保在 MATLAB 中移动到包含
compile.m的文件夹并通过键入compile从命令行运行它。