필터 지우기
필터 지우기

Mex Error: undeclared identifier What does this mean?

조회 수: 7 (최근 30일)
Natalia
Natalia 2011년 2월 23일
Prompt please. I want to make mex from csfunc.c, but the compiler gives out errors, why?
>>mex csfunc.c
Error csfunc.c: 71 undeclared identifier `USE_DEFAULT_SIM_STATE'
Warning csfunc.c: 71 possible usage of USE_DEFAULT_SIM_STATE before definition
Etc. still it is a lot of errors

채택된 답변

Kaustubha Govind
Kaustubha Govind 2011년 2월 23일
This looks like Bug#661855. Install the patch to fix the issue.

추가 답변 (4개)

Yucel
Yucel 2011년 2월 23일
Do you have 64-bit operating system? In that case it's have some problems all the time.

Martijn
Martijn 2011년 2월 23일
USE_DEFAULT_SIM_STATE is defined in simstruc.h so it sounds like you may be missing the following include in your C code:
#include "simstruc.h"
Usually it is best to base your C S-functions on one of the templates like simulink\src\sfuntmpl_basic.c which already has this include line.

Natalia
Natalia 2011년 2월 23일
I have 32-bit windows 7, Matlab R2010b. I use a template simfeatures/src/csfunc.c and it includes #include "simstruc.h". I do mex on this template without changing it. Can try on XP?

Natalia
Natalia 2011년 2월 23일
Thanks for the help. It is valid that is necessary.

카테고리

Help CenterFile Exchange에서 Troubleshooting in MATLAB Compiler SDK에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by