Problems compiling a 3 line Motif program!!!

Dave Brillhart dcb at dave.mis.semi.harris.com
Mon Jun 3 22:43:44 AEST 1991


I've finally found time to start programming in the wonderful
world of Motif.  A friend recommended the Marshall Brain
Tutorials (a great tip).  I can't seem to get the first "Hello World"
program to compile... I'm sure it's some kind of setup problem.
(BTW, I can compile most other x programs except mxrn. The
only commonality I could find was mxrn also uses <Xm.h>.)

I'm running Ultrix 4.1 on a DECstation 5000. I loaded OSF/Motif
1.1. That MAY be the problem right there - I've read 4.1 is based
on R3 intrinisics while Motiif 1.1 is R4???  Any conformation on
that? What follows is the program and error message (same thing
happens with or without the commented lines):

Thanks in advance for and comments,
   Dave Brillhart
   Harris Semiconductor
   Melbourne, FL
=======================================================
#include <X11/Intrinsic.h>
#include <Xm/Xm.h>
#include <Xm/Label.h>

main(int argc, char *argv[])
{
  Widget toplevel;  Arg al[10];  int ac=0;

  toplevel = XtInitialize(argv[0],"",NULL,0,&argc,argv);
/*
 
XtSetArg(al[ac++],XmNlabelString,XmStringCreate("hello",XmSTRING_DEFAULT
T_CHARSET));
  msg = XtCreateManagedWidget("msg",xmLabelWidgetClass,toplevel,al,ac);
*/
  XtRealizeWidget(toplevel);
  XtMainLoop();
}
===========================================================
ccom: Error: /usr/lib/DXM/lib/Xm/Xm.h, line 2017: syntax error
      typedef XtPointer (*XmResourceBaseProc)();
      -------------------^
ccom: Error: /usr/lib/DXM/lib/Xm/Xm.h, line 2017: function returns
illegal type
      typedef XtPointer (*XmResourceBaseProc)();
      -----------------------------------------^
ccom: Error: /usr/lib/DXM/lib/Xm/Xm.h, line 2020: syntax error
          XmResourceBaseProc  base_proc;
      ---------------------^
(ccom): /usr/lib/DXM/lib/Xm/Xm.h, line 2020: cannot recover from earlier
errors: goodbye!
          XmResourceBaseProc  base_proc;
      ----------------------------------^



More information about the Comp.unix.ultrix mailing list