unable to create mex function‘s​tmodel.mex​w64’requir​ed for simulation

조회 수: 12 (최근 30일)
正昊 陆
正昊 陆 2022년 1월 24일
답변: Gyan Vaibhav 2024년 1월 30일
dear officers, when i set a breakpoints in the stateflow and run the model, The diagnosis viewer showed that‘C:\Users\SV00272503\Desktop\PHEV_RE300_03ME10GW22(V61)\Model\Test_Model\MIL\slprj\_sfprj\StModeCtrl_swc_MIL\_self\sfun\src>"D:\softwaresetup\matlab\sys\lcc64\lcc64\bin\lccmake.exe" -f StModeCtrl_swc_MIL_sfun.lmk cpp: stmodectrl_swc_mil_sfun.c:1 Unterminated string or char const cpp: stmodectrl_swc_mil_sfun.c:2 Unterminated string or char const cpp: stmodectrl_swc_mil_sfun.c:3 No newline at end of file cpp: stmodectrl_swc_mil_sfun.c:4 EOF in string or char constant "D:\softwaresetup\matlab\sys\lcc64\lcc64\bin\lcc64.exe" -dll -noregistrylookup -c -Zp8 -DLCC_WIN64 -DMATLAB_MEX_FILE -DMX_COMPAT_32 -nodeclspec -I"D:\softwaresetup\matlab\sys\lcc64\lcc64\include64" -I"D:\softwaresetup\matlab\extern\include" -I"D:\softwaresetup\matlab\simulink\include" -I"D:\softwaresetup\matlab\stateflow\c\mex\include" -I"D:\softwaresetup\matlab\rtw\c\src" -I"C:\Users\SV00272503\Desktop\PHEV_RE300_03ME10GW22(V61)\Model\Test_Model\MIL\slprj\_sfprj\StModeCtrl_swc_MIL\_self\sfun\src" "StModeCtrl_swc_MIL_sfun.c" D:\softwaresetup\matlab\sys\lcc64\lcc64\bin\lccmake.exe: Error code 1 Component: Make | Category: Make error Unable to create mex function 'StModeCtrl_swc_MIL_sfun.mexw64' required for simulation. Component: Simulink | Category: Model error’ could you tell me the reason why it happened and how to solve it. best wishes

답변 (1개)

Gyan Vaibhav
Gyan Vaibhav 2024년 1월 30일
Hi,
So as per my understanding you are trying to generate a mex function, but you are unable to generate the mex function.
If you could provide the C code it would have been easier to detect and guide you to fix the errors. As mentioned in the error you posted it seems like, the following errors are there with your stmodectrl_swc_mil_sfun.c file.
Please look for these points and try fixing them:
  1. Unterminated string or char const: This error suggests that there are syntax errors in the stmodectrl_swc_mil_sfun.c file, specifically with string or character constants that are not properly terminated with a closing semicolon.
  2. EOF in string or char constant: This indicates that the end of the file was reached while the compiler was still inside a string or character literal, which is likely due to missing closing quotes.
Please try fixing these issues and retrying to create the MEX files.
Hope this helps.
Thanks
Gyan

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by