Error "sfun_rtlab_comm.o: No such file or directory" at compilation

Problem

I have a model and the following error message appears at compilation during build process on target :

"ntox86-g++-3.3.5: sfun_rtlab_comm.o: No such file or directory"

But the model plays offline and the call to RTW is correct. What is the problem ?

Solution

This error is caused by an OpComm block misplacement. This block can be inserted only at the first level of subsystems SM, SC or SC. If an OpComm has been placed (or forgotten) in a subsystem located within SM_ or SS_ (see attached picture) this error appears at compilation.

If an OpComm has been placed (or forgotten) in a subsystem located within SC_ (see attached picture) this error appears at execution.

In both cases you have to remove the OpComm from a subsystem and make sure all your OpComm are placed only at first level of SM_, SS_ or SC_ subsystems.

Opcomm_bad_placement_sm_ss.png - SM or SS subsystem OpComm misplacement example
Opcomm_bad_placement_sc.png - SC subsystem OpComm misplacement example