From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,35a9cc077f3df42d,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-02-25 17:25:08 PST Path: gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lille1.fr!cict.fr!ecstasy!manu From: manu@ecstasy.cemes.fr (Emmanuel Courcelle) Newsgroups: comp.sys.dec Subject: String class with Xt applications ? Date: 25 Feb 1994 14:09:22 GMT Message-ID: <2kl0qi$egb@reseau.cict.fr> NNTP-Posting-Host: 192.93.13.7 X-Newsreader: TIN [version 1.2 PL2] 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 // the C++ class: String #include #include ... 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 #include #include #include #ifdef XT_BC #include /* for R4 compatibility */ #else #include #ifndef X_NOT_STDC_ENV #include /* for XtNewString */ #else #ifdef SYSV #include #else #include #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 --------------------------------------------------------------