[comp.windows.x] Xt under g++

cearl@aristotle.ils.nwu.edu (Charles Earl) (08/08/90)

In some initial attempts to compile and link g++ sources using the X Intrinsics
plus X Widget set, I noticed some errors. Namely the g++ compiler has problems
with the declaration

typedef char *String;

in Intrinsic.h. Linking seems to fail (link with X11,Xw,Xt,Xaw,Xmu,g++)
complaining about Xlib functions not being found. (e.g. XFillRectangle).

I suspect that either (a) I'm forgetting to add an important include file/lib
or (b) the g++ connection to X is only robust given some kit like Interviews,
etc. Anyway, seems as though attempting to write Xt applications in g++ should
be somewhat common.

Refs appreciated.

Confused.

Charles Earl
ILS
(708)467-1004
 

cearl@ils.nwu.edu (Charles Earl) (08/08/90)

I am experiencing some initial difficulty compiling and linking g++
source which
makes use of X Intrinsics and Widget set. Compiler complains about the
following
declaration in Intrinsics.h
typedef char *String

The linker also seems not to be able to locate Xlib functions (e.g. 
XFillRectangle ). I link with X11,Xaw,Xt,Xw,Xmu, and g++. 

I suppose either (a) I failed to add some important include file/or library
(this code simply puts up a button however, and seems to compile fine under
gcc), or (b) there is some incompatability with g++ and Xt and I should wait
for Interviews or some such toolkit.

Refs appreciated.

Charles Earl
ILS (708)467-1004
 

swick@ATHENA.MIT.EDU (Ralph Swick) (08/08/90)

    the g++ compiler has problems
    with the declaration

    typedef char *String;

    in Intrinsic.h.

Sounds like you haven't installed fixes 10&11.

daniel@osf.org (Daniel Dardailler) (08/09/90)

Did you already apply the official MIT fixes (from 1 to 14) before
to use g++ with Xt and X ?
If not, I guess this is your problem.

        Daniel Dardailler          |          OSF/Motif Team  
     Open Software Foundation      |      Email : daniel@osf.org           
       11 Cambridge Center         |      Phone : (617) 621 8840    
       CAMBRIDGE, MA 02142         |      Fax   : (617) 621 0584