Informix Error -3762: The user function funcname defined in the form could not be found in the C function definition table userfuncs.
Cause and resolution
The user function funcname defined in the form could not be found in the C function definition table userfuncs.
The INSTRUCTIONS section of the form includes a call to a function funcname, and sperform assumes that this is the name of an external C function. However, the name and address of each such function must appear in a static array that is named userfuncs. That array, along with the computer code of the external functions, is linked with a custom version of sperform. Because name did not appear in the array, sperform cannot call it.
Check that you are executing the correct, customized version of sperform (the original version of the program has no external functions linked to it). Check to see if funcname is correctly spelled. Then examine the source of the C functions to make sure that the userfuncs array is defined correctly.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-3762 fires when a form's INSTRUCTIONS section calls an external C function that
sperform can't find — per the official guidance, sperform expects the function's name and
address to appear in a static array named userfuncs, linked into a custom version of
sperform along with the C function's code; the original (unmodified) sperform has no
external functions linked.
- Running the original, unmodified
sperforminstead of the custom-linked version, per the official guidance — the first named cause. - A misspelled function name in the form, per the official guidance — the second named cause.
- The
userfuncsarray not correctly defined in the linked C source, per the official guidance — the third named cause.
Solutions / Resolution
- Check that the correct, customized version of
sperformis being executed, per the official guidance. - Check that
funcnameis spelled correctly, per the official guidance. - Examine the C source to confirm
userfuncsis defined correctly, per the official guidance.
Examples
Checking the userfuncs array
struct userfunc userfuncs[] = {
{ "myfunc", myfunc },
{ NULL, NULL }
};
Diagnostic Checks
- Confirm the custom
sperformbinary (withuserfuncslinked) is being run, and that the function name matches an entry inuserfuncsexactly.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -3762 in this set yet.
sperform couldn't find the named C function in userfuncs — confirm the custom binary is
running, the name is spelled correctly, and userfuncs is defined correctly.