From: CRDGW2::CRDGW2::MRGATE::"SMTP::AI.MIT.EDU::GNULISTS" 28-FEB-1991 05:50:25.72 To: ARISIA::EVERHART CC: Subj: Re: X, Motif, and C++ working together ? From: gnulists@ai.mit.edu@SMTP@CRDGW2 To: Everhart@Arisia@MRGATE Received: by crdgw1.ge.com (5.57/GE 1.87) id AA26229; Thu, 28 Feb 91 05:37:21 EST Received: by life.ai.mit.edu (4.1/AI-4.10) id AA19321; Thu, 28 Feb 91 02:09:25 EST Return-Path: Received: from wheat-chex (wheat-chex.ai.mit.edu) by life.ai.mit.edu (4.1/AI-4.10) id AA19288; Thu, 28 Feb 91 02:07:19 EST Received: by wheat-chex (4.1/AI-4.10) id AA00606; Thu, 28 Feb 91 02:07:16 EST Resent-Date: 19 Feb 91 06:42:52 GMT Resent-From: gnulists@ai.mit.edu Resent-Message-Id: <9102280707.AA00606@wheat-chex> Received: from tut.cis.ohio-state.edu by life.ai.mit.edu (4.1/AI-4.10) id AA15998; Thu, 21 Feb 91 16:24:07 EST Received: by tut.cis.ohio-state.edu (5.61-kk/5.910130) id AA15762; Thu, 21 Feb 91 16:20:28 -0500 Received: from USENET by tut.cis.ohio-state.edu with netnews for help-g++@prep.ai.mit.edu (help-g++@prep.ai.mit.edu) (contact usenet@tut.cis.ohio-state.edu if you have questions) Date: 19 Feb 91 06:42:52 GMT From: tcs!nujoizey!gwu@uunet.uu.net (George Wu) Sender: gnulists@ai.mit.edu Organization: Teknekron Communications Systems Subject: Re: X, Motif, and C++ working together ? Message-Id: <1774@tcs.tcs.com> References: <1991Feb19.042400.2842@csn.org> To: help-g++@prep.ai.mit.edu - This is probably an frequently asked question, since a few people complained when I asked a very similar question a month or so ago. (Yes, for those who asked me to send on the information I got, I will do so soon. I just seem to always get distracted by another fire.) Anyways, if you're using GNU's g++, then things are a bit simpler. You should be including Motif and X heder files in an extern "C" statement, and this turns off argument checking. Hence, you can just use the ordinary header files without problems. (There are a few other problems, such as the use of "class" as a field within a struct, but these few remaining problems are trivial.) For every other compiler of which I am aware, extern "C" only turns off name mangling, not function argument type checking. Hence, you will need prototyped header files. The easiest way to get such header files is to go with Release Four of X11 and Motif 1.1. If you can't do so, there are a few projects out there which have added prototyping for the work they have done. Included amongst such projects are: o WWL, a set of C++ classes to wrap X Toolkit Widgets, available via anonymous FTP from expo.lcs.mit.edu (18.30.0.212); o X++, also a wrapper set of class available at the address below. (There is FTP access available, but you're supposed to purchase a liscense for $250 US first.): University of Lowell Graphics Research Laboratory/Motif Computer Science Department One University Avenue Lowell, MA 01854 attn : Fran Ward (phone 508-934-3628); o THINGS, a class library written at the Rome Air Force Base by the Strategic Air Command, available as freeware on some of the public archives (Sorry, that's all I know.); o HP C++ 2.0 with Motif 1.0 (and therefore X11 [release three?]) header files (HP C++ 2.1 is supposed to ship any minute now, if it hasn't already.); o HP-UX 8.0, not due out for a few more months, but you might be able to get HP to lend you alpha/beta test a copy or some or all of it (I tried briefly, but gave up when other courses proved more fruitful.); o Saber C++ as X11 header files with prototypes, but I don't know about Motif. Both the Saber C++ and HP-UX work might include prototyped header files only because they are really upgrades to X11, Release Four, and/or Motif 1.1. I don't know, that's just my uneducated guess. ---- George J Wu, Software Engineer | gwu@tcs.com or uunet!tcs!gwu Teknekron Communications Systems, Inc.| (415) 649-3752 2121 Allston Way, Berkeley, CA, 94704 | Quit reading news. Get back to work.