Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!snorkelwacker!bloom-beacon!SUMEX-AIM.STANFORD.EDU!brock From: brock@SUMEX-AIM.STANFORD.EDU (Kevin Brock) Newsgroups: comp.windows.x Subject: Re: X & C++ (next round) Message-ID: Date: 20 Jul 90 15:53:06 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 46 The problem was with the program, not the compile-line. I've included the modified version below; it will compile and run on a SPARC Station 1 running Sun OS 4.0.3c using GNU's g++ and X11R4. The compile line was: g++ junk.c -lXaw -lXmu -lXt -lXext -lX11 You might want to think about either using the extern "C" {} declaration for the X headers or making sure that they're all modified to be C++ compatible. ---------------------------- junk.c ------------------------------------- #include #include #include #include String fallback_resources[] = { "*Label.Label: This is xlabel", NULL }; static XrmOptionDescRec options[] = { {"-label", "*Label.label", XrmoptionSepArg, NULL} }; main(int argc, char** argv) { static void Syntax(); XtAppContext app_con; Widget toplevel; toplevel = XtAppInitialize(&app_con, "Xlabel", options, XtNumber(options), &argc, argv, fallback_resources, NULL, ZERO); (void) XtCreateManagedWidget("label", labelWidgetClass, toplevel, NULL, ZERO); XtRealizeWidget(toplevel); XtAppMainLoop(app_con); } --------------------------- Kevin Brock brock@sumex-aim.stanford.edu -------