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

   


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM