The code generator expects a main vi with the default connector pane:
When generating C code with a main VI that has a different connector pane, the following error message will appear:
Set the connector pane to the default pattern by right clicking on it:
See LabVIEW Help for more informations about the connector pane.