Why do I receive an error regarding incompatible types when building my model in Real-Time Workshop 5.1 (R13SP1)?

1 view (last 30 days)
When I build my model files, I receive the following error during the compile stage of the build process:
### Compiling NewMotorFish.c
cl -Ot /c /O2 /Ot /nologo
W0 -DMODEL=NewMotorFish -DRT -DNUMST=2 -DTID01EQ=1 -DNCSTATES=51 -DMT=0 -
DHAVESTDIO -DXPCMSVISUALC -DXPCCALLCONV= NewMotorFish.c
NewMotorFish.c
NewMotorFish.c(7374) : error C2115: 'function' : incompatible types
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed for Release 14 SP1 (R14SP1). For previous releases, please read below for any possible workarounds:
This has been verified as a bug in Real-Time Workshop 5.1 (R13SP1) in the way that code is generated from atomic subsystems. Currently, to work around this issue, try the following:
1) Right-click on the subsystem(s) whose generated code is producing an error and select "Subsystem parameters ..."
2) Check "Treat as atomic unit"
3) Change the "RTW system code" property from Auto to Function.
4) After the changes have been made, rebuild the model.

More Answers (0)

Categories

Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!