compiler-errors - 为自定义MATLAB工具箱执行编译器脚本时出错

我想逐步解决我遇到的问题。我想将http://www.cs.man.ac.uk/~gbrown/fstoolbox/上的工具箱用于在32位Matlab R2012a中进行的研究中的多种用途。这是我在Matlab中使用“CompileFeat.m”脚本时遇到的错误,必须调用该脚本来编译C语言中设计的主要工具箱功能。当然,我将解压缩的文件夹复制到当前的工作路径中,并将所有文件夹添加到当前的工作路径。

>> CompileFEAST

  C:\PROGRA~2\MATLAB\R2012A\BIN\MEX.PL: Error: 'FSToolboxMex.c' not found. 

Error using mex (line 206)
Unable to complete successfully.

Error in CompileFEAST (line 3)
mex -I../MIToolbox FSToolboxMex.c BetaGamma.c CMIM.c CondMI.c DISR.c ICAP.c JMI.c
mRMR_D.c ../MIToolbox/MutualInformation.c ../MIToolbox/Entropy.c
../MIToolbox/CalculateProbability.c ../MIToolbox/Arr 

因此,在Google进行了一些深入的研究之后,我看到了许多建议,要求我检查是否已安装编译器。请参见下面的代码:
>> mex -setup

Welcome to mex -setup.  This utility will help you set up  
a default compiler.  For a list of supported compilers, see  
http://www.mathworks.com/support/compilers/R2012a/win32.html 

Please choose your compiler for building MEX-files: 

Would you like mex to locate installed compilers [y]/n? y

Select a compiler: 
[1] Lcc-win32 C 2.4.1 in C:\PROGRA~2\MATLAB\R2012a\sys\lcc 
[2] Microsoft Software Development Kit (SDK) 7.1 in C:\Program Files (x86)\Microsoft Visual Studio 10.0 

[0] None 

Compiler: 2

Please verify your choices: 

Compiler: Microsoft Software Development Kit (SDK) 7.1 
Location: C:\Program Files (x86)\Microsoft Visual Studio 10.0 

Are these correct [y]/n? y

*************************************************************************** 
  Warning: MEX-files generated using Microsoft Windows Software Development  
           Kit (SDK) require that Microsoft Visual Studio 2010 run-time  
           libraries be available on the computer they are run on. 
           If you plan to redistribute your MEX-files to other MATLAB 
           users, be sure that they have the run-time libraries. 
*************************************************************************** 


Trying to update options file: C:\Users\JQ\AppData\Roaming\MathWorks\MATLAB\R2012a\mexopts.bat 
From template:              C:\PROGRA~2\MATLAB\R2012a\bin\win32\mexopts\mssdk71opts.bat 

Done . . . 

************************************************************************** 
  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/techdoc/matlab_external/bsflnue-1.html 
           Building with the -largeArrayDims option enables the new API. 

完成此步骤后,我神奇地希望我对“CompileFeast.m”的下一个调用能够成功。相反,我收到:
>> CompileFEAST

  C:\PROGRA~2\MATLAB\R2012A\BIN\MEX.PL: Error: 'FSToolboxMex.c' not found. 

Error using mex (line 206)
Unable to complete successfully.

Error in CompileFEAST (line 3)
mex -I../MIToolbox FSToolboxMex.c BetaGamma.c CMIM.c CondMI.c DISR.c ICAP.c JMI.c
mRMR_D.c ../MIToolbox/MutualInformation.c ../MIToolbox/Entropy.c
../MIToolbox/CalculateProbability.c ../MIToolbox/Arr 

同样的问题!在进一步挫败地调查问题之后,建议使用 dir 函数查看文件是否在目录中(甚至不是),请参见以下内容:
>> dir 'CompileFEAST.m'
CompileFEAST.m not found.

为了确保可以在Matlab路径中看到其他文件,请检查另一个函数以查看其是否在目录中:
>> dir 'hurst.m'

hurst.m

如您所见,该文件位于目录中。我只是提供了与将上述工具箱添加到Matlab工作路径中相同的过程,我要做的就是将文件复制到工作路径中,然后将文件或子文件夹添加到该路径中。

有人注意到我要去哪里了吗?我不是很想解决这样的问题,我或多或少使用Matlab作为移动模型构建平台来理解算法。

我期待任何评论。

干杯,
Ĵ

最佳答案

我认为您当前的目录(pwd)是错误的。

尝试:

cd('E:\School\hidethis\hidethis\MATLAB work\FEAST\FEAST\FSToolbox')
CompileFEAST

https://stackoverflow.com/questions/19453917/

相关文章:

generics - Ada : invalid prefix in selected compon

file - 处理时output.println()中的错误

objective-c - 错误Maddage : expected expression? [du

c# - NHibernate错误:s

oop - 对字段和方法使用私有(private)而不是 protected 原因

objective-c - 使用typedef枚举时,返回类型枚举EnumName返回枚举成员时会产

compiler-errors - 模式匹配Erlang?

compiler-errors - 编译器无法识别显式类型

c# - C#asp.net中UPDATE语句中的语法错误

twitter-bootstrap - 导航栏中的两行,一列跨越两行