Why does my Embedded MATLAB Function block fail to compile to C++ when it contains a switch statement in Simulink 6.2 (R14SP2)?
Show older comments
I have a model set to compile to C++ with an Embedded MATLAB Function block. In this block, I have a switch statement with a variable that represents a character. When I try to run this model, I receieve the following error:
### Compiling "c2_eml_fail.cpp"
cl.exe -c -Zp8 -G5 -GR -W3 -DMATLAB_MEX_FILE -nologo /MD /I "t:\1-1joeg9\sfprj\build\eml_fail\sfun\src" /I "t:\1-1joeg9" /I "d:\program files\matlab704\extern\include" /I "d:\program files\matlab704\simulink\include" /I "d:\program files\matlab704\stateflow\c\mex\include" /I "d:\program files\matlab704\stateflow\c\debugger\include" /I "d:\program files\matlab704\toolbox\eml\lib\dsp" "c2_eml_fail.cpp"
c2_eml_fail.cpp
c2_eml_fail.cpp(216) : error C2664: 'cv_eml_init_switch' : cannot convert parameter 10 from 'unsigned int *' to 'int *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'
Stop.
The full build log and the model are attached.
Accepted Answer
More Answers (0)
Categories
Find more on ARM Cortex-A Processors 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!