Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!caen!zaphod.mps.ohio-state.edu!think.com!linus!linus!mir!dsr From: dsr@mir.mitre.org (Douglas S. Rand) Newsgroups: comp.windows.x Subject: Re: X11 questions: Graphics, C++, R3-R4 Message-ID: <1991Feb21.183958.6290@linus.mitre.org> Date: 21 Feb 91 18:39:58 GMT References: <1460002@hpgnd.grenoble.hp.com> Sender: news@linus.mitre.org (News Service) Reply-To: dsr@mir.mitre.org (Douglas S. Rand) Organization: The MITRE Corporation Lines: 33 Nntp-Posting-Host: mir.mitre.org It seems this question is asked every week. The include files with X11R4 are compatible with C++. Motif is usable as is, mostly include the header files inside extern "C" { .... }. There is a minor problem with Instrinsics.h and a definition of String which causes confusion with the libg++ or other String class. This is fixable but not quite right in the distribution: should be: // Right in the beginning of Instrinsics.h #if defined(__cplusplus) || defined(c_plusplus) #define CONST const /* make const String do the right thing */ #define String char* #else typedef char *String; #define CONST #endif /* __cplusplus */ and: // At end #undef String #undef CONST -- Douglas S. Rand Internet: Snail: MITRE, Burlington Road, Bedford, MA Disclaimer: MITRE might agree with me - then again... Amateur Radio: KC1KJ