f



fatal error C1083: Cannot open include file: 'simstruc.h': No such file or directory

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
1
Michael
1/8/2011 12:25:08 AM
comp.soft-sys.matlab 211266 articles. 22 followers. lunamoonmoon (257) is leader. Post Follow

7 Replies
4319 Views

Similar Articles

[PageSpeed] 5

This a reply I got from another forum

I assume this is the header file for the simulink tootbox (which I have never used)
do you need to download and install the toolbox? set up paths, etc?

Does that make sense to anyone?

also I have found this 

"Matthew " < - > wrote in message <i7ptrd$q9s$ - >...
> Since updating to 2010b, when ever I try and mex a .cpp file I get the error: Fatal Error C1083: Cannot open include file: 'simstruc.h': No such file or directory. This even happens using Simulinks own S-Function Builder. When I look for the file I see that it is in Matlab\Simulink\Include. Were is the path setup for Simulink mex and why did this change from 2010a?
>
> Thanks,
> Matt

Fixed per Bug Report 661855, for some reason that doesn't show up on Google!?

I have the same problem ,you can modify the file mexopts.bat .and find the line "set INCLUDE" then add the following string "%MATLAB%\simulink\include;"

To be honest, this still doesn't explain or clear-up anything for me
0
Michael
1/8/2011 10:31:05 AM
Can anybody help with this? Please
0
Michael
1/8/2011 1:52:03 PM
Does anyone know how I can modify the the mexopts.bat file or do i have to install and update if there was a bug as is indicated in the above message.
0
Michael
1/8/2011 11:35:04 PM
OK I have fund the mexopts.bat  file and found the line "set INCLUDE" then added the following string "%MATLAB%\simulink\include;"

and that worked
0
Michael
1/9/2011 11:16:04 AM
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
7/15/2011 8:19:13 PM
"Hashim  Mazhar" <hashim.mazhar@gmail.com> wrote in message <ivq7c0$ktr$1@newscl01ah.mathworks.com>...
> 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!

Thank you so much! I did and now it works perfectly.
Thank you
0
3/29/2012 6:11:12 PM
"Michael O Loinsigh" wrote in message <ig9q62$pfm$1@fred.mathworks.com>...
> Can anybody help with this? Please
0
berust24 (1)
4/25/2013 7:37:09 AM
Reply: