如何在windows 8.1下在Matlab 2014b中安装SPAMS工具箱
How to install SPAMS toolbox in Matlab 2014b under windows 8.1
我正在努力学习如何在使用Windows 8.1操作系统和MATLAB R2014b的机器上成功编译"稀疏建模软件"(SPAMS)。
我采取的步骤如下(有些零件可能是不必要的或缺失的)
步骤1.已安装"Microsoft Visual C++2013 Professional"。
步骤2.已安装"Microsoft Windows软件开发工具包(SDK)"。
步骤3.从下载"spams-matlab-v2.4-svn2014-02-18.tar"http://spams-devel.gforge.inria.fr/
步骤4.在Windows中使用7-zip解压缩。我只收到一个错误,但其他所有数据都未压缩。错误是:
ERROR: Can not set reparse data: C:UsersYasharDesktopspams-matlabcpp_libraryspams.h
步骤5:在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:UsersYasharDesktopspams-matlabFiles not found; check that you are in the
correct current folder, and check the spelling of
'C:UsersYasharDesktopspams-matlabFiles'.
Error in compile (line 391)
mex(args{:});
问题:我所做的看起来很标准,但我知道需要一段时间来学习如何处理与MATLAB等接口代码有关的问题。你能帮我解决我遇到的问题并在我的机器中编译SPAMS工具箱吗?仅供参考,我有兴趣在这个工具箱中使用mexLasso函数。
嗯。编译这个工具箱有点棘手。
以下是我在Windows7+MATLAB2013a中的操作方法希望它对你有用。
(我没有解压缩的问题)
首先,你想确保"mex"正常工作,我编译了一些较小的包,它们总体上正常工作。
第二,更改线路
compiler='gcc';
至
compiler='mex';
第三,你可以发现很多线条看起来像
-I./linalg/ -I./decomp/ -I./prox/ -I./spams/dictLearn/ dictLearn/mex/mexArchetypalAnalysis.cpp
给我/lib_name/是Linux风格的路径,您需要将其更改为Windows能够理解的路径。
这里有一个例子:
-I./linalg/ ---> -IC:UsersXXXDownloadsSPAMSlinalg
总共有六件事你需要改变如下,
- -I/直线加速器/
- -I/反编译/
- -I/prox/
- -I/dictLearn/
- -I/dags/
- -I/图像/
替换这些字符串后,只需运行compile.m
,它就可以工作了。
选择2.5版本您正在运行的SPAMS软件的Windows版本。在compile.m
中将编译器设置为VS并执行代码。这将生成所需的文件。最后运行start_spams.m
,它依次创建源文件夹。现在,您可以运行相应的代码。
- 在Ubuntu 16.04上安装Cilk时出现问题
- 在CMakeLists.txt的安装功能中使用.cmake文件有什么用
- C++:如何在CLion IDE中安装Boost
- 安装opencv失败-粘贴CMakeError.log的内容
- 在cygwin中测试新的boost安装时出现cpp错误
- 有人安装"IITB Simplecpp in mac"吗?
- 我可以在 Arduino 的库文件夹之外安装库吗?
- Mingw-64 在构建和安装后不会编译 openCV 代码
- 为什么构建目录中新构建的共享库与安装目录中的副本具有不同的依赖项集?
- 安装 libc++ 时出现问题
- 安装MinGW后C++编译器不起作用?
- 介子复制/安装头文件到输出目录并保持文件夹结构
- 无法安装 R 包 "nloptr"(Ubuntu 16.04 上的 R3.6.2) - C++编译器问题
- 如何在 Ubuntu 上安装 OpenCV for C/C++
- 检查是否安装了 windows10 C++
- 安装 psutil 和为 pypy 配置期间出错
- 如何在 Debian 10 上安装 CPP 手册页?
- 如何更改使用 CPack 安装的可执行文件的名称?
- 在 macOS Sierra 上安装 SPAMS
- 如何在windows 8.1下在Matlab 2014b中安装SPAMS工具箱