Re: problem compiling with AllWidgets.h
[email]wvanhooste@yahoo.com[/email] (W. Van Hooste) wrote in news:495823bb.0307241331.78667d32
@posting.google.com:[color=blue]
> #include <X11/Xaw/AllWidgets.h>[/color]
Xaw does not include the Xm header files.
Ken Lee, [url]http://www.rahul.net/kenton/[/url]
Re: problem compiling with AllWidgets.h
Although I am very unexperienced in this area, I have managed to compile
it on my system(Mandrake 9.1):
#include <Xm/Xm.h>
#include <Xm/Label.h>
#include <Xm/LabelG.h>
#include <Xm/LabelGP.h>
#include <Xm/LabelP.h>
#include <Xm/MainW.h>
#include <Xm/MainWP.h>
#include <X11/Xaw/AllWidgets.h>
void
main (int argc,
char *argv[])
{
Widget toplevel, main_w, button;
XtAppContext app;
XtSetLanguageProc (NULL, NULL, NULL);
toplevel = XtVaAppInitialize(&app, "main", NULL, 0,
&argc, argv, NULL, NULL);
main_w = XtVaCreateManagedWidget("main_w",
xmMainWindowWidgetClass,
toplevel, XmNscrollingPolicy,
XmAUTOMATIC, NULL);
button = XtVaCreateWidget ("Hello World", xmLabelWidgetClass,
main_w, NULL);
XtManageChild (button);
XtRealizeWidget (toplevel);
XtAppMainLoop (app);
}
gcc -lXm prog.c -o prog