问题回顾:首先在MATLAB下调用c编译器,mex -setup以及mbuil -setup都不行的情形下有两个解决方案:
问题解决途径:按照方案2执行如下:
1.在微软官网,下载 Microsoft Windows SDK7.1(或者在微软官网下载,matlab提示该编译器支持所有win7以上64位版本MATLAB coder)。
2.下载后文件为:winsdk_web.exe,以管理员身份运行,下一步.............(不做其他修改即可),等待安装完成(半小时左右,看配置与网速情况)。
3.将MATLAB2013a软件推出,重新打开。
4.输入:mex -setup——>n——>17——>y——>y,即可完成SDK7.1的C编译器关联,显示如下:
Trying to update options file: C:\Users\YCHG\AppData\Roaming\MathWorks\MATLAB\R2013a\mexopts.bat
From template: D:\worksoft\matlab\bin\win64\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/ma ... use-64-bit-api.html
Building with the -largeArrayDims option enables the new API.
**************************************************************************
5.输入:mex -setup——>y——>选择7.1版C编译器即可。