解决在WIN7(64位)上Mex无法编译的问题

来源:互联网 发布:免费书旗软件下载 编辑:程序博客网 时间:2024/05/30 05:29

问题:

继续还是那套MATLAB代码点击打开链接

使用里面complie.m编译时出现一下错误提示:

**************************************************************************   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/support/solutions/data/1-5C27B9.html?solution=1-5C27B9            Building with the -largeArrayDims option enables the new API. **************************************************************************  >> COMPILECompiling Normalization   D:\PROGRA~2\MATLAB\R2008A\BIN\MEX.PL: Error: Compile of 'mxNormalize.cpp' failed.  ??? Error using ==> mex at 207Unable to complete successfully.

查了很久,发现是编译器的问题。

在MATLAB 7.8 (R2009a)及之后的版本,就会支持-largeArrayDims


解决方法mathworks给出的方案

  1. 安装 Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1".(下载地址)
  2. 选项中选择支持: Visual C++ 9.0 Compilers. These compilers allow you to target x86, x64, IA64 processor architectures."
  3. 看看有没这个文件 C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\cl.exe。有就应该支持64位了。

原创粉丝点击