Matlab2014a使用VS2015混合编译

matlab的版本要到2015b才支持vs2015,然而自己电脑上用的matlab2014a,和VS2015社区版,不想重新安装,需要替换其mexopts文件夹,估计就类似于一个mexMakefile文件,路径为R2014a\bin\win64\mexopts。下载之,替换即可。mexopts文件夹的下载地址为 http://pan.baidu.com/s/1o8hR926 ,之后做以下步骤编译即可。

   

>> mex -setup

MEX 配置为使用 'Microsoft Visual C++ 2015 Professional (C)' 以进行 C 语言编译。

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.

   

要选择不同的语言,请从以下选项中选择一种命令:

mex -setup C++

mex -setup FORTRAN

>> mex -setup C++

MEX 配置为使用 'Microsoft Visual C++ 2015 Professional' 以进行 C++ 语言编译。

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.

>> mex -v yourfile.cpp

   

转载于:https://www.cnblogs.com/Yan47/p/6418129.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值