Matlab2014a使用VS2015混合編譯

matlab的版本要到2015b才支持vs2015,然而本身電腦上用的matlab2014a,和VS2015社區版,不想從新安裝,須要替換其mexopts文件夾,估計就相似於一個mexMakefile文件,路徑爲R2014a\bin\win64\mexopts。下載之,替換便可。mexopts文件夾的下載地址爲 http://pan.baidu.com/s/1o8hR926 ,以後作如下步驟編譯便可。 html

   

>> mex -setup api

MEX 配置爲使用 'Microsoft Visual C++ 2015 Professional (C)' 以進行 C 語言編譯。 ui

Warning: The MATLAB C and Fortran API has changed to support MATLAB this

variables with more than 2^32-1 elements. In the near future spa

you will be required to update your code to utilize the code

new API. You can find more information about this at: orm

http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html. htm

   

要選擇不一樣的語言,請從如下選項中選擇一種命令: element

mex -setup C++ get

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

相關文章
相關標籤/搜索