Problem
I have compiled the following sample code using the command:
cc -o foo foo.c -lXm -lXt -lX11 -lXmu -lsocket -lmallocRunning foo gives the error:Floating exception - core dumped#include <stdio.h>
#include <Xm/Form.h>
#include <Xm/Label.h>main(int argc, char *argv[])
{
XtAppContext appContext;Widget appShell = XtVaAppInitialize (&appContext, "DebugTest", NULL, 0, &argc, argv, NULL, NULL);
Widget form = XtVaCreateManagedWidget("", xmFormWidgetClass, appShell, XmNmarginWidth, 1, NULL);
XtVaCreateManagedWidget("LabelString",
xmLabelWidgetClass, form,
XmNleftAttachment, XmATTACH_POSITION,
XmNleftPosition, 0,
NULL); XtRealizeWidget(appShell);
XtAppMainLoop(appContext);
} Cause
There is a problem with the enhanced form handling code in the X Libraries that ship with SCO OpenServer Release 5.0.0 and SCO OpenServer 5.0.2.
Solution
This problem has been reported to SCO Engineering.
One workaround to the problem is to suppress the Form capability. This can be done by adding the following lines to the .Xdefaults file in the users home directory:
! Allow all enhancements except FORM
*useIxiAdds: DRAWINGAREA, EDITRES, XPM3, LIST, CAPSLOCK, PANEDW, NUMLOCK, ENVIRONMENT