From: judy@qucis.queensu.ca (Judy Russell)
Subject: Do X libs in OpenWindows 3 $OPENWINHOME/lib work?
Organization: Computing & Information Science, Queen's University at Kingston
Date: Wed, 29 Jul 1992 19:57:48 GMT


I'm a novice at X programming, so I hope I'm not asking a FAQ, but I did
look over the comp.windows.x* FAQs that seemed applicable and I haven't
found an answer, so here goes.

My Question : 

  Is it possible to compile and run X11 programs with Athena widgets using 
  the X libraries provided with Sun's OpenWindows 3?  

Background (why I want to do this) :

  I want to install some X11 software on a sparc IPC lab that I haven't got 
  root access to.  This lab is currently running OpenWindows 2, and should
  be running OpenWindows 3 by the time I want to install this software (I
  will be installing it in my home directory, which is readable to a group
  of users).  The lab is NOT running the MIT X11 distribution.
  
  The software is a library of routines that use basic X11 stuff - Athena
  widgets.  It compiles and runs fine under MIT X11R5 (which we have here 
  on our system).  I assumed that since OpenWindows 3 includes the X11R4 
  core distribution, and appears to have the relevant libraries, that I
  could recompile the library using the X11 include files provided with 
  OpenWindows 3, and then users on the sparc lab could include the routines
  from the library, compile with the OpenWindows versions of the X11 
  libraries, and go.  I'm attempting to test out this theory on our system 
  (which has OpenWindows 3 installed in /usr/local/openwindows) and I'm 
  having no luck at all.

My Problems So Far :

  First off, I ran into problems with Undefined symbols 
  
  gcc  -o XGraph main.o src/XGraph.a -L/usr/local/openwin/lib -lXaw -lXmu -lXt -lXext -lX11 -lm
  ld: Undefined symbol
     _get_wmShellWidgetClass
     _get_applicationShellWidgetClass

  We managed to fudge that away by noticing that these symbols are defined in
  libXmu*, so figuring that that was the problem we tried a different libXmu,

  gcc  -o XGraph main.o src/XGraph.a -t -L/usr/local/openwin/lib -lXaw /usr/local/openwin/lib/libXmu.a -lXt -lX11 -lXext -lm

  This compiles, but the executable segmentation faults in a library routine :

  % dbx XGraph
  Reading symbolic information...
  Read 2469 symbols
  (dbx) run
  Running: XGraph 
  signal SEGV (no mapping at the fault address) in GetnormalGC at 0xf7775d50
  GetnormalGC+0x20:       ld      [%o0 + 4], %o0
  (dbx) where
  GetnormalGC() at 0xf7775d50
  `Label`Initialize() at 0xf7775e44
  CallInitialize() at 0xf772566c
  _XtCreate() at 0xf77259b0
  _XtCreateWidget() at 0xf7725cc4
  XtCreateWidget() at 0xf7725d54
  XtCreateManagedWidget() at 0xf7725d78
  InitGraphics(), line 324 in "init.c"
  main(), line 23 in "main.c"

Is there any point in  pursuing this?  Has anyone managed to compile
and run X11 programs with Athena widgets using the libraries provided
with  OpenWindows 3?  Or should I cut my losses now and work on getting
MIT X11R5 installed in my home directory on the sparc lab?

Please reply to me, I will post a summary if there is interest

thanks
judy
-------------------------------------------------------------------------------
Judy Russell                            Internet:  judy@qucis.queensu.ca
Dept of Computing                       Bitnet:    judy@qucis.bitnet
and Information Science                 Phone:     613-545-6734
Queen's University, Kingston, Ontario, Canada
-------------------------------------------------------------------------------