- 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.
- 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.
unable to create mex function‘stmodel.mexw64’required for simulation
14 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Gyan Vaibhav
on 30 Jan 2024
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:
Please try fixing these issues and retrying to create the MEX files.
Hope this helps.
Thanks
Gyan
0 Comments
See Also
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!