I have syntax errors when compiling my C codes using S-Function Builder

조회 수: 3 (최근 30일)
Hancheol
Hancheol 2013년 4월 15일
I've tried to convert my C codes to realize them in Simulink using S-Function Builder.
However, when compiling them, I have the following syntax errors:
Error ENG_wrapper.c: 566 syntax error; found '{' expecting ';'
Error ENG_wrapper.c: 566 skipping '{'
Error ENG_wrapper.c: 764 syntax error: found 'end of input' expecting '}'
Error ENG_wrapper.c: 764 syntax error: found 'end of input' expecting '}'
The corresponding c codes are:
#564: void ENG_Logic(void)
#565:
#566: {
#567: ENG_SUB_D_IN();
......
#764: ENG_SUB_FLAG_SEQ_CHK(); // Some other function is called.
It seems that there are no errors in the code.
I would be greatly appreciated if anyone helps me find what the problem is.
Thanks.

답변 (1개)

Image Analyst
Image Analyst 2013년 4월 15일
Where is the final closing brace, like it is asking you about? Shouldn't line 765 be a "}"????
  댓글 수: 2
Hancheol
Hancheol 2013년 4월 15일
Line #765 is in the middle of the function 'ENG_Logic.'
Its final closing brace is located at line #1991...
Image Analyst
Image Analyst 2013년 4월 15일
Put the cursor on the brace (or if, while, end statements). It will momentarily put a cursor on the line that has the matching brace. I think somewhere your braces or parentheses or end's don't match up.

댓글을 달려면 로그인하십시오.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by