fatal error in matlab

조회 수: 7 (최근 30일)
Guru
Guru 2023년 1월 25일
답변: Satwik 2025년 1월 22일
I have s-function file created from rhapsody now i am running it in matlab and i am getting error.
i have installed miniGW compiler also.
please help me i want use the s-function file from rhapsody to simulink and integrate between them.
ERROR:
Error using mex
In file included from C:\Program Files\IBM\Rhapsody\9.0.1\Share\LangCpp/oxf/rawtypes.h:31:0,
from C:\Program Files\IBM\Rhapsody\9.0.1\Share\LangCpp/oxf/os.h:22,
from C:\Users\GURUU1\Downloads\DefaultConfig\RhapSFunc_state.cpp:38:
C:\Program Files\IBM\Rhapsody\9.0.1\Share\LangCpp/oxf/OXFSelectiveInclude.h:91:22: fatal error: iostream.h: No such file
or directory
#include <iostream.h>
^
compilation terminated.
Error in build_sfunction (line 1)
mex -DWIN32 COMPFLAGS="$COMPFLAGS /MDd" -DUSE_SYS_TYPES_FD_SET -D__USE_W32_SOCKETS -D_OMINSTRUMENT -DOM_WITH_CLEANUP -D_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH -I. -I"C:\Program Files\IBM\Rhapsody\9.0.1\Share/LangCpp" -I"C:\Program Files\IBM\Rhapsody\9.0.1\Share/LangCpp/oxf" -I"C:\Program Files\IBM\Rhapsody\9.0.1\Share/LangCpp/osconfig/WIN32" -I"C:\Program Files\IBM\Rhapsody\9.0.1\Share/LangCpp/aom" -I"C:\Program Files\IBM\Rhapsody\9.0.1\Share/LangCpp/tom" -I"C:\Program Files\IBM\Rhapsody\9.0.1\Share/Profiles/Simulink" RhapSFunc_state.cpp Default.cpp class_0.cpp class_1.cpp state.cpp "C:\Program Files\IBM\Rhapsody\9.0.1\Share/LangCpp/oxf/OMSFunctionTimer.cpp" "C:\Program Files\IBM\Rhapsody\9.0.1\Share/LangCpp/oxf/OMSFunctionTimerFactory.cpp" "C:\ProgramData\IBM\Rhapsody\9.0.1x64\UserShare/LangCpp/lib/MSVC16x64oxfinst.lib" "C:\ProgramData\IBM\Rhapsody\9.0.1x64\UserShare/LangCpp/lib/MSVC16x64aomanim.lib" "C:\ProgramData\IBM\Rhapsody\9.0.1x64\UserShare/LangCpp/lib/MSVC16x64omComAppl.lib" wsock32.lib winmm.lib

답변 (1개)

Satwik
Satwik 2025년 1월 22일
Hi Guru,
The header 'iostream.h' is a non-standard header and does not exist on all platforms. So any code using it might not compile on the system.
The 'iostream.h' header used to be common before C++ was first standardized in 1998. But since the 98 standard used '<iostream>' instead of '<iostream.h>', the latter has fallen out of favor and is no longer supported on all platforms.
In order to resolve the issue, I suggest using
#include <isotream>
instead of
#include <iostream.h>
I hope this helps!

카테고리

Help CenterFile Exchange에서 Block Libraries에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by