Informix Error -4097: Multiple declarations for class "name".
Cause and resolution
Multiple declarations for class "name".
This class has been declared previously in the source module (perhaps in an included file). Only one declaration is allowed. Find all declarations of the class, and reduce them to one.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4097 fires when a class is declared more than once in the source module (possibly via an included file) — per the official guidance, only one declaration per class is allowed.
- A class declared more than once, possibly across multiple
INCLUDEd files, per the official guidance — the direct, only cause.
Solutions / Resolution
- Find all declarations of the class, and reduce them to one, per the official guidance.
Examples
Including a class definition twice
INCLUDE "order_class.4gl"
INCLUDE "order_class.4gl"
-- -4097: Order is declared twice
Corrected
INCLUDE "order_class.4gl"
Diagnostic Checks
- Check every
INCLUDEin the module for files that declare the same class more than once, and remove the duplicate.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4097 in this set yet.
A class is declared more than once, likely via a duplicate INCLUDE — reduce it to one
declaration.