Matlab2013a中simulink仿真无法启动C编译器的解决方法

来源:互联网 发布:linux竖线怎么打 编辑:程序博客网 时间:2024/06/08 13:55
错误信息:
"Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks.

Use 'mex -setup' to select a supported C-compiler."

使用mex -setup 选择VS2012之后还是出错,使用低版本2010a或者高版本2014b时可以运行。

参考Mathworks的官方支持,发现bug及解决方案如下:

Summary

Stateflow charts and MATLAB Function blocks do not work with Microsoft Visual Studio (MSVC) 2012.

Description

When you select Microsoft Visual Studio (MSVC) 2012 as your MEX compiler, you get an error if you try to update a Simulink model that contains Stateflow charts or MATLAB Function blocks. Here is the error message:

"Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks.Use 'mex -setup' to select a supported C-compiler."

Workaround

Installation instructions

  1. Log in to an account with appropriate permissions to overwrite files in your MATLAB installation.
  2. Locate your MATLAB installation by typing matlabroot at the MATLAB command prompt. This folder is referred to as <MATLAB> in subsequent steps.
  3. Exit MATLAB.
  4. Download the attached .zip file associated with this Bug Report and store the file in the <MATLAB> folder.
  5. Make a backup copy of each of the files listed in the .zip file. To see the contents of the .zip file:
    • Windows Systems*: Open the .zip file and look at the contents.
  6. Extract the files from the .zip file.
    • Windows Systems*:
      1. Open the .zip file.
      2. Extract the contents of the file to your <MATLAB> folder.
  7. Delete the .zip file in the <MATLAB> folder.
  8. Launch MATLAB and run "mex -setup" in the command window. Select MSVC 2012 as the default compiler.

*Notes for Windows Systems:

  1. If you see “Error: Access is denied” when attempting to extract the .zip file, you may need to start WinZip in administrator mode. Do this by navigating to WinZip.exe or the WinZip Start menu entry, right-clicking on it, and selecting Run as administrator.
  2. From within WinZip, find and open the downloaded .zip file.
  3. Extract the contents of the file to your <MATLAB> folder.

Change log::

  1. May 10, 2013: attachment_931218_13a_2013-05-10.zip: initial version, works on R2013a only.

Fix

This bug was fixed as of R2013b(8.2).

If you have a current subscription to MathWorks Software Maintenance Service (SMS), you can download product updates. If not, learn more about MathWorks SMS.

Attachments

  • attachment_931218_13a_2013-05-10.zip 

Exists in

Product NameRelease (Version) SimulinkR2013a (8.1)补丁可以通过https://www.mathworks.com/support/bugreports/931218下载,后续版本已经解决这一问题

或者到这里http://download.csdn.net/detail/u012565167/9767015

0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 公司搬走注册地怎么办 注册公司没有房产证怎么办 公司不运营了怎么办 公司注销了账户怎么办 租户不变更地址怎么办 营业执照忘审了怎么办 工商营业执照年检过期怎么办 个体营业执照没有年报怎么办? 个体工商户一年没有申报怎么办 个体工商户逾期未申报怎么办 个体户没报税过怎么办 农业银行证书过期了怎么办 ca证书丢了怎么办 ca证书被锁怎么办 上个月忘记清卡怎么办 财务人员进入税务黑名单怎么办 社保本丢了怎么办 贷款车辆登记证书怎么办 发票薄丢了怎么办? 汽车发票丢了怎么办 税票弄丢了怎么办 交强险正本丢了怎么办 个体营业执照正本丢失怎么办 简易注销后税务怎么办 拒绝了日历邀请怎么办 老人走丢了怎么办 老人走丢找不到怎么办 没人给介绍对象怎么办 bate365账号被锁怎么办 qq号疑似被盗怎么办 不知道音乐名字怎么办 忘记支付宝登录怎么办 微信被老婆拉黑怎么办 微信群昵称改不了怎么办 微信号设置不了怎么办 修改微信号点不开怎么办 多屏设置失败怎么办 icould密码忘了怎么办 微信号换不了怎么办 微信号改不了怎么办? 无法设置微信号怎么办