From: manu@ecstasy.cemes.fr (Emmanuel Courcelle)
Subject: String class with Xt applications ?
Date: 25 Feb 1994 14:09:22 GMT [thread overview]
Message-ID: <2kl0qi$egb@reseau.cict.fr> (raw)
Hello everybody.
I am starting developping an Motif-based application, and I would like
to work in C++: I use Dec C++ v1.30, with the classlib furnished by Dec
(only the iostream, String etc. classes).
The program starts as follows:
#include <string.hxx> // the C++ class: String
#include <Xm/Xm.h>
#include <X11/Xmp/Xmp.h>
... etc ...
and I get the message:
/usr/include/cxx/X11/Intrinsic.h:79: error: In this declaration, the type of
"String" is not compatible with the type of a previous declaration of
"String" at /usr/include/cxx/string.hxx:129: .
Here is the beginning of Intrinsic.h:
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xresource.h>
#include <X11/Xfuncproto.h>
#ifdef XT_BC
#include <X11/Xos.h> /* for R4 compatibility */
#else
#include <X11/Xosdefs.h>
#ifndef X_NOT_STDC_ENV
#include <string.h> /* for XtNewString */
#else
#ifdef SYSV
#include <string.h>
#else
#include <strings.h>
#endif /* SYSV else */
#endif /* !X_NOT_STDC_ENV else */
#endif /* XT_BC else */
#define XtSpecificationRelease 5
typedef char *String;
#if NeedFunctionPrototypes
/* We do this in order to get "const" declarations to work right. We
* use _XtString instead of String so that C++ applications can
* #define String to something else if they choose, to avoid conflicts
* with other C++ libraries.
*/
#define _XtString char*
/* _Xt names are private to Xt implementation, do not use in client code */
Funny, isn't it ??? What do they mean with "#define String to something
else?" It looks like a bug, doesn't it ? Do you know a work-around ???
Thanks for your help !!!
--
--------------------------------------------------------------
Emmanuel COURCELLE
Groupe de cristallographie biologique du L.P.T.F.
CNRS/CEMES (LPTF) Tel (33) 62 25 79 62
29 rue Jeanne Marvig Fax (33) 62 25 79 60
31055 TOULOUSE cedex e-mail manu@ecstasy.cemes.fr
France
--------------------------------------------------------------
reply other threads:[~1994-02-25 14:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox