Why do I get the error "Cannot open include file: 'math.h'" when trying to compile a model using MSVC 2005 and Simulink 7.3 (R2009a)?
8 次查看(过去 30 天)
显示 更早的评论
I am trying to compile the demo model "xpcosc" for xPC Target using the MSVC 2005 compiler. Using the xPC Target Explorer (xpcexplr), I selected the Visual C compiler located in the following folder:
C:\Program Files\Microsoft Visual Studio 8
When I then try to build the model (Ctrl+B), I get the following error:
c:\temp\xpcocs\xpcosc_xpc_rtw\xpcosc.h(22) : fatal error C1083: Cannot open include file: 'math.h': No such file or directory
NMAKE : fatal error U1077: '"c:\program files\microsoft visual studio 8\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
采纳的回答
MathWorks Support Team
2009-6-27
This seems to be an issue in MSVC 2005, in the way that the file "math.h" is not present in a necessary "include" folder.
To work around this issue, copy the math.h file from the folder:
C:\Program Files\Microsoft Visual Studio 8\VC\crt\src\math.h
... to the following:
C:\Program Files\Microsoft Visual Studio 8\VC\include
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Target Computer Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!