Path: utzoo!attcan!uunet!ora!bloom-beacon!dont-send-mail-to-path-lines From: larry@hydro.saic.COM (Larry Clark) Newsgroups: comp.windows.x Subject: (none) Message-ID: <9102282350.AA05633@hydro.Saic.COM> Date: 28 Feb 91 23:50:02 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 232 HELP! I'm trying to compile the appended example "xbox3.c" from the X Toolkit Intrinsics Programming Manual by Nye and Oreilly on a DEC 5000/200 running ULTRIX 4.0 and there seems to be a configuration problem or something. We do have some different versions of the Xwindows stuff around but all the stuff I am using should be consistently revision 4. I get the following error: cc -o xbox3 xbox3.c /usr/mit/lib/Xaw/libXaw.a /usr/mit/lib/Xmu/libXmu.a /usr/m it/lib/Xt/libXt.a /usr/mit/lib/X/libX11.a ld: Undefined: XShapeQueryExtension XShapeCombineMask From my understanding of naming conventions these would seem to be Xlib functions that should be in libX11.a We have rev. 3 and rev 4 versions of libX11.a around. I have used odump -P libX11.a | grep XShapeQueryExtension odump -P libX11.a | grep XShapeCombineMask to search every version of libX11.a we have and found nothing. The calls to XShapeQueryExtension and XShapeCombineMask don't occur in the source file so I assume they must be calls from other library routines. Does anyone out there have any ideas? While we are at it, can anyone tell me how to control where the system looks for standard libraries and include files? Are there environment variable or something that can be set to change this? Thanks for your help: Laurance Clark larry@hydro.saic.com -------------------------------------------------------------------- /* * Copyright 1989 O'Reilly and Associates, Inc. * See ../Copyright for complete rights and liability information. */ /* * xbox3.c - simple button box */ /* * So that we can use fprintf: */ #include /* * Standard Toolkit include files: */ /* make sure all this X11 include stuff is r4 to match the Xaw and Xmu links #include #include #include */ #include "/usr/users/larry/include/r4/Intrinsic.h" #include "/usr/users/larry/include/r4/StringDefs.h" #include "/usr/users/larry/include/r4/Shell.h" /* * Public include files for widgets used in this file. */ #include #include #include /* * The popup shell ID is global because both dialog and pshell * are needed in the dialogDone callback, and both can't be * passed in without creating a structure. */ Widget pshell, pressme, quit; /* * dialog button */ /*ARGSUSED*/ void PopupDialog(w, client_data, call_data) Widget w; XtPointer client_data; /* cast to topLevel */ XtPointer call_data; { Widget topLevel = (Widget) client_data; Position x, y; Dimension width, height; /* * get the coordinates of the middle of topLevel widget. */ XtVaGetValues(topLevel, XtNwidth, &width, XtNheight, &height, NULL); /* * translate coordinates in application top-level window * into coordinates from root window origin. */ XtTranslateCoords(topLevel, /* Widget */ (Position) width/2, /* x */ (Position) height/2, /* y */ &x, &y); /* coords on root window */ /* move popup shell to this position (it's not visible yet) */ XtVaSetValues(pshell, XtNx, x, XtNy, y, NULL); /* * Indicate to user that no other application functions are * valid while dialog is popped up... */ XtSetSensitive(pressme, FALSE); XtSetSensitive(quit, FALSE); XtPopup(pshell, XtGrabNonexclusive); } /* * dialog done button */ /*ARGSUSED*/ void DialogDone(w, client_data, call_data) Widget w; XtPointer client_data; /* cast to dialog */ XtPointer call_data; { Widget dialog = (Widget) client_data; String string; XtPopdown(pshell); XtSetSensitive(pressme, TRUE); XtSetSensitive(quit, TRUE); /*next line generates undefined error string = XawDialogGetValueString(dialog); printf("User typed: %s\n", string); */ } /* * quit button callback function */ /*ARGSUSED*/ void Quit(w, client_data, call_data) Widget w; XtPointer client_data, call_data; { exit(0); } main(argc, argv) int argc; char **argv; { XtAppContext app_context; Widget box, topLevel, dialog, dialogDone; topLevel = XtVaAppInitialize( &app_context, /* Application context */ "XBox3", /* application class name */ NULL, 0, /* command line option list */ &argc, argv, /* command line args */ NULL, /* for missing app-defaults file */ NULL); /* terminate varargs list */ box = XtVaCreateManagedWidget( "box", /* widget name */ boxWidgetClass, /* widget class */ topLevel, /* parent widget*/ NULL); /* terminate varargs list */ /*move this down one function and the undefined error appears*/ #ifdef stupid quit = XtVaCreateManagedWidget( "quit", /* widget name */ commandWidgetClass, /* widget class */ box, /* parent widget*/ NULL); /* terminate varargs list */ pressme = XtVaCreateManagedWidget( "pressme", /* widget name */ commandWidgetClass, /* widget class */ box, /* parent widget*/ NULL); /* terminate varargs list */ pshell = XtVaCreatePopupShell( "pshell", transientShellWidgetClass, topLevel, NULL); /* terminate varargs list */ dialog = XtVaCreateManagedWidget( "dialog", /* widget name */ dialogWidgetClass, /* widget class */ pshell, /* parent widget*/ NULL); /* terminate varargs list */ dialogDone = XtVaCreateManagedWidget( "dialogDone", /* widget name */ commandWidgetClass, /* widget class */ dialog, /* parent widget*/ NULL); /* terminate varargs list */ #endif /*move this up 1 function and the undefined error appears*/ XtAddCallback(quit, XtNcallback, Quit, 0); XtAddCallback(dialogDone, XtNcallback, DialogDone, dialog); XtAddCallback(pressme, XtNcallback, PopupDialog, topLevel); XtRealizeWidget(topLevel); XtAppMainLoop(app_context); }