Informix Error -4043: Illegal EXTERNAL declaration.
Cause and resolution
Illegal EXTERNAL declaration.
This statement tries to declare an EXTERNAL classname::membername. A program cannot use a global EXTERNAL declaration to declare a shared member variable. To accomplish this, include the class description of which it is a SHARED member.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4043 fires when a program tries to declare EXTERNAL classname::membername — per the official
guidance, a global EXTERNAL declaration can't be used to declare a shared member variable
this way.
- An
EXTERNAL classname::membernamedeclaration, per the official guidance — the direct, only cause.
Solutions / Resolution
- Include the class description of which the variable is a
SHAREDmember, per the official guidance, instead of using a globalEXTERNALdeclaration.
Examples
An illegal EXTERNAL declaration
EXTERNAL Order::nextId
-- -4043: SHARED members are not declared via global EXTERNAL
Corrected
INCLUDE "order_class.4gl"
-- Order::nextId is accessed directly once the class is included
Diagnostic Checks
- Check for any
EXTERNAL classname::membernamedeclaration, and replace it with anINCLUDEof the class's own description.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4043 in this set yet.
A SHARED class member was declared via global EXTERNAL — include the class description
instead.