MATLB2014a編譯exe遇到的問題解決方法(64位win7/10親測)

1、按照網上說的運行mex -setup或者mbuild -setup,出現:
錯誤使用 mbuild (line 164),Unable to complete successfully.未找到支持的編譯器或 SDK。有關選項,請訪問http://www.mathworks.com/support/compilers/R2014a/win64。
然後打開http://www.mathworks.com/support/compilers/R2014a/win64鏈接,查找2014a對應的編譯器要求,若沒有安裝VS,則可以選擇安裝:Mrcrosoft Windows SDK7.1和.Net FrameWork 4.0
在這裏插入圖片描述
在https://www.microsoft.com/zh-cn/download/details.aspx?id=17718下載“.Net FrameWork 4.0”並安裝,或者4.0之後的版本都是可以的。
在https://www.microsoft.com/en-us/download/details.aspx?id=8279下載“Microsoft Windows SDK for Windows 7 and .NET Framework 4”,此時先不要安裝。
直接安裝可能會出現以下錯誤:
1)“Some components cannot be installed” Some Windows SDK components require the RTM.NET
忽略此錯誤,直接點確定繼續安裝。
2)“A problem occurred while installing selected Windows SDK components.Installation of the “Microsoft Windows SDK for Windows 7” product has reported the following error: DeleteFileSafe failed (10th try)”
這是因爲電腦上之前安裝過VS2010或者VS2010的擴展包,需要先卸載掉。打開“開始”,選擇“程序和功能”,打開“程序”列表,找到:
在這裏插入圖片描述
將上述兩個組件都卸載掉。然後安裝剛纔下載的“Mrcrosoft Windows SDK7.1”包。
然後,打開MATLAB2014a運行mex -setup時會出現:

這是因爲剛纔把VS2010相關的組件卸載了,打開“https://www.microsoft.com/en-us/download/details.aspx?id=13523”下載Microsoft Visual C++ 2010 SP1 Redistributable Package (x64),然後安裝。
2、安裝成功後,打開MATLAB2014a,運行

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章