Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!aerospace.aero.ORG!strauss From: strauss@aerospace.aero.ORG Newsgroups: comp.windows.x Subject: Re: Troubles with gcc 1.37.1 and mit/rgb Message-ID: <9007142317.AA03763@aerospace.aero.org> Date: 14 Jul 90 23:17:18 GMT References: <9007131856.AA06628@genmri.sane.COM> Sender: daemon@athena.mit.edu (Mr Background) Organization: The Aerospace Corporation Lines: 30 In article <9007131856.AA06628@genmri.sane.COM> you write: >I'm a novice at using gcc, and I'm having trouble with the rgb >executable in the rgb subdirectory. BEFORE YOU TUNE OUT, I HAVE read >the latest "most frequently asked questions." :-) > >I'm getting a segmentation violation from rgb/rgb when I compile with >gcc 1.37.1 on a Sun 4/280 running SunOS 4.0.3c (fixincludes WAS run). >I'm running X11R4 through patchlevel 12. Here is a sample (some >newlines inserted by the selection mechanism): > You can't use gcc for the RGB program. The problem is that gcc returns structures differently than cc. On the sun3 there is an option to -fpcc-struct-return, but it is listed as a bug with gcc that the switch is ignored for the sparc. DBM is a cc compiled library that uses structure returns. Just compile that with cc. In fact, I am not sure why you are trying to use gcc for the X stuff on the sparc. From my experience the code on a sparc using gcc and cc is almost identical. - |Daryll ------------------------------------------------------------------------------- Daryll Strauss f The Aerospace Corp. strauss@aero.org n Mail Stop: M1-102 ...!uunet!aero.org!strauss o P.O. Box 92957 r Los Angeles, Ca. 90009 "MY opinions. You here me? They're mine!" d (213) 336-9358 -------------------------------------------------------------------------------