Topic: Conflict between X11R5 and AIX xlC


Author: bab@se40.wg2.waii.com (Brian Button)
Date: 22 Sep 1993 18:50:20 GMT
Raw View
I'm in the process of porting our software from a sparc10 to aix, and
I ran into a problem dealing with XtResources.

The following code compiles under CenterLine's version of cfront 2 and
3 and gcc2.4.5, but not under xlC.

// ;;;;;;;;; -*- c++ -*- ;;;;;;;;;;;;;;

#include    <Xm/Xm.h>

#define XmNterse    "terse"
#define XmCTerse    "Terse"

#define XmNlink     "link"
#define XmCLink     "Link"

class A
{
  private:
    static XtResource  resource_list[ ];

    char *  _terse;
    char *  _link;

  public:
    A( ) { }
};

XtResource A::resource_list[ ] =
{
    {
        XmNterse, XmCTerse, XmRString, sizeof(String),
*       XtOffset(A*, _terse),
        XmRString, ( XtPointer )""
    },
    {
        XmNlink, XmCLink, XmRString, sizeof(String),
*       XtOffset(A*, _link),
        XmRString, ( XtPointer )""
    }
};

// ;;;;;;;;;;;;;;;;;;;;;;;;;;;

Under xlC, I get an error on the two starred lines about being unable
to access private members _terse and _link.

Who is correct, and if it is xlC, any suggestions about how to correct
this in my code?

Due to the portability issue involved, this seemed a more appropriate
group than lang.c++.

Thanks,
bab
--
|-----------------------|----------------------------------------------------|
| Brian Button          | email : button@wg2.waii.com                        |
| Design Engineer       |         71023.276@compuserve.com                   |
| Western Geophysical   | voice : (713)964-6221                              |
| 3600 Briarpark        |----------------------------------------------------|
| Houston, Texas  77042 |                                                    |
|-----------------------|----------------------------------------------------|