Greetings!
I've just downloaded, built, and installed LessTif 0.90.1, and am trying
to get the examples from the O'Reilly Motif Programming Manual to run.
Using the following command line:
gcc -ohello -I/usr/local/LessTif/Motif1.2/include -I/usr/X11R6/include
-L/usr/X11R6/lib -L/usr/local/LessTif/Motif2.0/lib -lXt -lXm -lX11
hello.c
I've successfully compiled the following program:
#include <Xm/PushB.h>
void button_pushed(Widget widget,
XtPointer client_data,
XtPointer event_data)
{
printf("Hello Yourself!");
}
int main(int argc, char **argv)
{
Widget toplevel, button;
XtAppContext app;
XmString label;
XtSetLanguageProc( NULL, NULL, NULL );
toplevel = XtVaAppInitialize(&app, "Hello", NULL, 0, &argc, argv,
NULL, NULL);
label = XmStringCreateLocalized("Push here to say hello!");
button = XtVaCreateManagedWidget("pushme",
xmPushButtonWidgetClass,
toplevel, XmNlabelString, label,
NULL);
XmStringFree(label);
XtAddCallback(button, XmNactivateCallback, button_pushed, NULL );
XtRealizeWidget(toplevel);
XtAppMainLoop(app);
}
But when I run it, I get the following messages:
Warning: XmPushButton ClassInitialize: XmeTraitSet failed
Warning: Cannot allocate colormap entry, some colors may be incorrect
Error: attempt to add non-widget child "DropSiteManager" to parent
"hello" which supports only widgets.
Other information is that I'm using RedHat Linux 6.1, I'm on a HP Vectra
VL with 128 Mb RAM, 166 MHz processor, Matrox Millenium 2Mb graphic
card, and using the XFREE_SVGA server.
I will assume that I'm doing something wrong, and any enlightenment will
be greatly appreciated.
Thanks for your time.
Charles McKnight
[EMAIL PROTECTED]