fatal error in matlab

3 Ansichten (letzte 30 Tage)
Guru
Guru am 25 Jan. 2023
Beantwortet: Satwik am 22 Jan. 2025
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

Antworten (1)

Satwik
Satwik am 22 Jan. 2025
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!

Kategorien

Mehr zu Block Libraries finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by