1 /* $Header: /cvsroot/lesstif/lesstif/test/Xm/vendor/test5.c,v 1.2 2001/03/18 11:28:34 rwscott Exp $
2 test for correct linking order.
3 Should be linked incorrectly: -lXt -lXm */
4
5 #include <stdlib.h>
6 #include <stdio.h>
7 #include <Xm/Xm.h>
8 #include <Xm/Label.h>
9 #include <Xm/MwmUtil.h>
10
11 void
error_handler(String msg)12 error_handler(String msg)
13 {
14 fprintf(stderr, "%s\n", msg);
15 return;
16 }
17
18 int
main(int argc,char ** argv)19 main(int argc, char **argv)
20 {
21 Widget toplevel, one;
22 XtAppContext app;
23 Boolean brc=True;
24
25 XtSetLanguageProc(NULL, NULL, NULL);
26
27 toplevel = XtVaAppInitialize(&app, "Label",
28 NULL, 0,
29 &argc, argv, NULL,
30 XmNmwmDecorations, MWM_DECOR_BORDER | MWM_DECOR_TITLE,
31 NULL);
32
33 #ifdef LESSTIF_VERSION
34 XtAppSetErrorHandler(app, (XtErrorHandler)error_handler);
35 /* This test has to be in front of any further "activities */
36 brc=_LtCheckClassOfVendorShell(toplevel);
37 #endif
38
39 one = XtVaCreateManagedWidget("One", xmLabelWidgetClass,
40 toplevel, NULL);
41
42 XtRealizeWidget(toplevel);
43
44 exit(brc ? 1 : 0);
45
46 }
47