Converting Matlab 6.5 Level 2 S-Function to Matlab 2014b

조회 수: 1(최근 30일)
Fiona Steel
Fiona Steel 2015년 6월 25일
댓글: Fiona Steel 2015년 6월 28일
I'm trying to get a Matlab 6.5 level 2 S-Function to work in Matlab 2014b. This S-Function is used in an old simulink model we are trying to update. We have to be able to build the model, and not just run it.
When I try to use mex on the c file, I get the following errors & warnings
So there are 3 syntax errors on line 489 of rtlibsrc.h - an identifier 'rt_EnableState' a semicolon ';' and 'type' error. I see nothing wrong with the C code in rtlibsrc.h, and there shouldn't be any because it's a built in Matlab header file. Do you have any suggestions / ideas of why this might be happening?
Thanks!

답변(1개)

Drew Davis
Drew Davis 2015년 6월 26일
The rtw/c/lib and rtw/c/libsrc directories have been removed since the R2008b installation therefore if you are including the header:
#include "rtlibsrc.h
in your hand written c source file or TLC file you would encounter a compilation error.
Therefore, to resolve this issue, you will have to remove all dependencies upon these libraries in your custom written code.

Community Treasure Hunt

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

Start Hunting!

Translated by