国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

【Matlab】Matlab R2014a 64位與Visual Studio2015的mex相關問題

2019-11-08 02:59:09
字體:
來源:轉載
供稿:網友

由于C語言的高效性,在matlab中會經常需要調用C語言的衍生程序,所以用到mex。但是mex -setup中,MatlabR2014a在官方給出的文檔中,最高僅支持到VS2013。這讓用VS2015和MatlabR2014a的我們會很頭疼的一件事情。然而網上對這一方面的資料的好像比較少,通過google和各種百度,整理下面方法供大家參考一下

本文給出的方法僅僅面對MatlabR2014a 64位 與 Visual Studio2015,win10 環境

當mex -setup(注意存在空格)時,彈出:

Error using mex No supported compiler or SDK was found. For options, visit http://www.mathworks.com/support/compilers/R2014a/win64.

那么打開下面網址則可看到: 這里寫圖片描述

打開相應版本的supported compilers的detail,選擇下載下面的win sdk 這里寫圖片描述

當安裝完SDK后,再在matlab中敲入 mex -setup,則會彈出warning,顯示沒有合適的compilers。(應該類似下圖,當時我忘記截圖了,囧)

>> mex -setup Warning: Windows SDK 7.1 appears to be installed, but its compiler was not found. Install .NET Framework 4.0, and then rerun the SDK installation to add the "Visual C++ Compilers" component. See http://www.mathworks.com/support/solutions/en/data/1-IB1G3Q/ for more information. Error using mex No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see Install MinGW-w64 Compiler. For more options, see http://www.mathworks.com/support/compilers/R2015b/win64.html.

這里好像是因為下載的win sdk7.1是.net Framework4的,而win10的版本應該在.NET Framework 4.6,所以在這里出現一點問題。 這里寫圖片描述 具體參考: https://cn.mathworks.com/matlabcentral/answers/279692-why-does-microsoft-windows-sdk-7-1-not-get-detected-as-a-supported-compiler-for-windows-10-with-fram

當下載完上述網站給的鏈接后,matlab應該可以正常mex了

>> mex -setupMEX 配置為使用 'Microsoft Windows SDK 7.1 (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

以上,歡迎大家繼續補充


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 林周县| 龙陵县| 高要市| 两当县| 尚义县| 乌拉特后旗| 千阳县| 获嘉县| 奈曼旗| 通许县| 台江县| 广元市| 庄浪县| 咸阳市| 嘉兴市| 甘泉县| 汤阴县| 千阳县| 济阳县| 寿阳县| 黎城县| 兴业县| 鄂尔多斯市| 鄂托克前旗| 华亭县| 土默特右旗| 全南县| 咸丰县| 都安| 木里| 株洲县| 扶风县| 伽师县| 鄂温| 昭苏县| 隆安县| 鄂托克旗| 白玉县| 密山市| 南乐县| 广丰县|