compiled but won't run
compiled but won't run
- Subject: compiled but won't run
- From: email@hidden
- Date: Fri, 26 Dec 2003 10:01:22 -0700
I've compiled a sample XT app off the web for X11 using XCode and that
worked fine, but when I try to run it from X11 it barfs with this error:
ZeroLink: unknown symbol '_labelWidgetClass'
Abort trap
I can run all the pre-packaged apps that come with X's install, I can
see all the proper dylibs (I think they are anyway), I don't see
anything that I haven't done in the FAQ.
Any suggestions?
Here's the code for anyone who care :)
//main.c:3: X11/Intrinsic.h: No such file or directory
#include <stdio.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw/Command.h>
#include <X11/Xaw/Form.h>
#include <X11/Xaw/Box.h>
// exit the program
static void exitHandler(Widget w, XtPointer callData, XtPointer
clientData) {
exit(0);
}
// print "hello" to stdout
static void helloHandler(Widget w, XtPointer callData, XtPointer
clientData) {
printf("Hello\n");
}
/* main program */
void main(int argc, char **argv) {
XtAppContext appContext;
Widget toplevel, box, topLabel, bottomPanel, helloButton,
exitButton;
toplevel = XtVaAppInitialize(&appContext, "AthenaDemo", NULL, 0,
&argc, argv, NULL, NULL);
box = XtVaCreateManagedWidget("box",boxWidgetClass,toplevel,NULL);
topLabel = XtVaCreateManagedWidget("topLabel",
labelWidgetClass,
box,
XtNlabel,
" Pick One ",
XtNborderWidth,
0,
NULL);
bottomPanel = XtVaCreateManagedWidget("bottomPanel",
formWidgetClass,
box,
XtNsensitive,
True,
XtNborderWidth,
0,
NULL);
helloButton = XtVaCreateManagedWidget("helloButton",
commandWidgetClass,
bottomPanel,
XtNlabel,
" Hello ",
NULL);
XtAddCallback(helloButton, XtNcallback, helloHandler, NULL);
exitButton = XtVaCreateManagedWidget("exitButton",
commandWidgetClass,
bottomPanel,
XtNlabel,
" Exit ",
XtNfromHoriz,
helloButton,
NULL);
XtAddCallback(exitButton, XtNcallback, exitHandler, NULL);
XtRealizeWidget(toplevel);
XtAppMainLoop(appContext);
}
Thanks in advance.
Terrance Davis
www.genedavissoftware.com
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
X11 for Mac OS X FAQ: http://developer.apple.com/qa/qa2001/qa1232.html
Report issues, request features, feedback: http://developer.apple.com/bugreporter
Do not post admin requests to the list. They will be ignored.