필터 지우기
필터 지우기

mex compiled error with garbled code

조회 수: 6 (최근 30일)
yeyuan zhu
yeyuan zhu 2022년 11월 3일
답변: Samay Sagar 2024년 9월 20일 9:14
Hi, I am writing a c-mex function. At present, I have completed the writing of the. C file, but after compiling with the MEX instruction, I reported an error and garbled code. Could you please provide me with some ideas to solve the problem?
  댓글 수: 1
昱颖 陈
昱颖 陈 2024년 3월 7일
hi,have you solve the problem now?

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

답변 (1개)

Samay Sagar
Samay Sagar 2024년 9월 20일 9:14
The errors you are encountering suggest that there might be syntax errors in your C source file. Here are some steps you can take to resolve these issues:
  1. The errors like "C2143" and "C2449" suggest there might be missing semicolons (;), parentheses, or braces.
  2. Ensure that your code is compatible with the version of the compiler you are using.
  3. Use the "-v" option with the "mex" command for more detailed output, which can provide additional information regarding the errors.
  4. Ensure all preprocessor directives (#include, #define, #if, #endif, etc.) are correctly used and terminated. The error "C1070" suggests a possible issue with these.
  5. If the issue persists, try using a different compiler to see if the problem is specific to Microsoft Visual C++.
For more information about "mex" you can refer the following documentation:

카테고리

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

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by