inoue@sunburst.crd.ge.com (12/14/90)
I am starting programming Motif in C++. One thing is not clear, please help me. I am using Xm and Mrm of Mr. Kee Hinckley's patch version. Everything seems OK so far as far as I am using only C++. When I tried to use uil, things happened in C++ source. If I include <Mrm/MrmAppl.h> in a C++ file, syntax errors occure. If I include <Mrm/MrmPublic.h> instead of MrmAppl.h, it seems OK. The reason why MrmAppl.h is not good for C++ compiler is that MrmAppl.h includes <Xm/XmP.h>, XmP.h includes <Xm/Traversal.h>, Traversal.h includes <X11/ShellP.h>, and in ShellP.h the reserved word 'class' is used in a struct member(line 302). I had thought that ...P.h files are supposed to be included by widget defining file or libreries and not by application files. I think including MrmAppl.h is not legal but I am not sure. Can anyone tell me the policy? I first included MrmAppl.h file just because demo programs under /motif/demos/ directories are using that. After encountering the systax error trouble, I changed it to MrmPublic.h from my intuition, but actually Mrm.h was also OK for my petit program. In using C not C++, no problem was happend for using MrmAppl.h. Please tell me the policy and if possible, why motif demos are including MrmAppl.h. Should I change all #include lines from MrmAppl.h to MrmPublic.h in C files also? Takeshi Inoue (T.I.) G.E. CR&D (518)387-5694
meeks@osf.org (W. Scott Meeks) (12/22/90)
>From: crdgw1!sunburst.crd.ge.com!inoue@uunet.uu.net > >In using C not C++, no problem was happend for using MrmAppl.h. >Please tell me the policy and if possible, why motif demos are >including MrmAppl.h. Should I change all #include lines from >MrmAppl.h to MrmPublic.h in C files also? > Yes, MrmPublic.h is the correct include file for applications using Mrm functions; the use of MrmAppl.h has been deprecated. The demos in 1.1 include MrmAppl.h as a holdover from 1.0 when MrmAppl.h was the proper include file and the incompatibility problems with C++ hadn't been fully realized yet. This will be fixed in 1.1.1 when it is released; all demos will include MrmPublic.h instead of MrmAppl.h. W. Scott Meeks Open Software Foundation meeks@osf.org (617) 621-7229