[comp.windows.x] gcc and X

fleming@nvuxk.uucp (George W. Fleming, fleming@nvuxk.cc.bellcore.com) (08/08/90)

I just tried to compile X11R4 (PL12) on my SUN Sparc-1 running SUN OS4.1.
According to the instructions, specifying having gcc should make the code
run faster, so I did that...I have gcc-1.37.1...Everything seems to compile
OK, but I noticed that when make tries to run mit/rgb/rgb to build  a data
file, there was a segmentation fault and core dump.  If I recompile rgb.c
by hand with Sun's cc, there was no problem...

My question is:  Is this caused by gcc?  Has anyone compiled X and gotten 
it to run using gcc?  Is gcc worth it?

bill@gothamcity.jsc.nasa.gov (Bill Shirley [CSC]) (04/24/91)

I have recently obtained a copy of gcc and tryed to compile my current application
(which currently works with UNIX cc) and I got the following:

Undefined:
_XShapeQueryExtension
_XShapeCombineMask


This seems to imply that SHAPE is defined somewhere?

I am on a Sun SPARCstation 4/330 with SunOS 4.0.3 and
am using X11R4; I included libs: -ll -lXaw -lXt -lXmu -lX11

Has anyone had this problem?  Am I missing something?

>-=-<|>-=-<|>-=-<|>-=-<|>-=-<|>-=-<|>-=-<|>-=-<|>-=-<|>-=-<
		Bill Shirley
	bill@gothamcity.jsc.nasa.gov
>-=-<|>-=-<|>-=-<|>-=-<|>-=-<|>-=-<|>-=-<|>-=-<|>-=-<|>-=-<

simon@liasun2.epfl.ch (Simon Leinen) (04/25/91)

I doubt that this used to work with Sun's cc.  If you use libXaw or
libXmu on Suns (using dynamic linking as is the default), you also
have to use libXext.  This is because the Athena widgets contain
buttons which may be non-rectangular if the server supports the SHAPE
extension.  The code for this is in libXmu and uses code from libXext.

So what you could do is add -lXext to the libs.  But the better
solution is to put the following definitions in your Imakefile:

        DEPLIBS = XawClientDepLibs
LOCAL_LIBRARIES = XawClientLibs

... because imake knows what libraries you need on different OSes.
-- 
Simon.

tony@mcrsys.UUCP (Tony Becker) (04/25/91)

From article <1991Apr23.214241.22626@aio.jsc.nasa.gov>, by bill@gothamcity.jsc.nasa.gov (Bill Shirley [CSC]):
> 
> Undefined:
> _XShapeQueryExtension
> _XShapeCombineMask
> 
> 

Bill:
from the client source: ../../extensions/server/libext.a
or as -lext 

as Shape is an extension to X11R3. (in R4).

-- 
tony ,....