simulink 库编译错误

Hi

I am new to Matlab and I am trying to mex .c files for the ADM1 model.  I have the 64bit program and installed the Visio compiler.  I did the mex -setup successfully but when I try to mex the .c files I get the following error message:

>> mex adm1_DAE1.c

adm1_DAE1.c
adm1_DAE1.c(19) : fatal error C1083: Cannot open include file: 'simstruc.h': No such file or directory

  C:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: Compile of 'adm1_DAE1.c' failed.

??? Error using ==> mex at 208
Unable to complete successfully.

Anyone have any ideas what the problem is?






Thanks I found the mexopts.bat in C:\Users\*yourUsername*\AppData\Roaming\MathWorks\MATLAB\R2010b and added the string "%MATLAB%\simulink\include;" right after where it says "set INCLUDE = " so that it finally looks something like this

"set INCLUDE=%MATLAB%\simulink\include;%VCINSTALLDIR%\INCLUDE;%VCINSTALLDIR%\ATLMFC\INCLUDE;%LINKERDIR%\include;%INCLUDE%"

and it worked. Thanks for the help all!
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值