simulink 库编译错误

来源:互联网 发布:java程序员为什么转行 编辑:程序博客网 时间:2024/06/08 00:36
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!
原创粉丝点击