|
From: Mattia B. <mb...@ds...> - 2002-04-18 18:31:40
|
> Hi Mattia,
>
> Thanks for replying to my message: (see below)
You're welcome!
> Mattia Barbon wrote:
> >
> > > Has any one been succesful with building wxPerl on SGI? I get hundreds
> > > of compilation errors:
<snip>
> > > SvREFCNT_inc( m_self );
> > > ^
> > >
> > > cc-1367 CC: ERROR File = Grid.c, Line = 184
> > > A pointer to an incomplete class type is not allowed.
> > >
> > > bool show = (int)SvIV(ST(1));
<snip>
> > * Is it a C or C++ compiler ( or both )?
>
> It is a C++ compiler (that can also handle C).
>
> > * If it is both, and uses the .c or .cpp ( or .cxx, or whatever ) to
> > discriminate between C and C++, is there a way to force it to compile
> > a .c file as C++?
>
> I am certain that it is treating the file as C++. When I tried "cc"
> (instead of CC) it gave bunch of errors such as:
>
> cc-1020 cc: ERROR File = /usr/local/include/wx/defs.h, Line = 456
> The identifier "class" is undefined.
>
> class WXDLLEXPORT wxObject;
> ^
Sigh, one easy solution gone
> This is clearly a c verses c++ issue. However, when I use CC, then I
> get bunch of errors that all seems to be related to SvREFCNT_inc, SvOK,
> SvUV, SvPV_nolen, etc. In fact the first 40 errors all include the
> mentioned names, all with the same message:
>
> A pointer to an incomplete class type is not allowed.
>
> >
> > * if you do ( from the top level directory )
> > $ make Wx.c
> > $ cp Wx.c Wx.cpp ( or .cxx or .cc ... )
> > $ make Wx.o
> > CC ..... Wx.c
>
> I did, with no effect. Any other suggestions?
I'm running short of suggestions :-(
I think CC has a "preprocess to standard output" mode ( like gcc -E )
could you do
$ CC --switch-to-preprocess-to-stdout ..options.. Wx.cpp > Wx.i
and send Wx.i to me, ( better if gzipped )?
Also: do a "make 2>&1 > make.log" and send the log to me.
Another idea ( after you created the Wx.i and make.log ): in Wx.xs try replacing
WXPL_EXTERN_C_START with extern "C" {
WXPL_EXTERN_C_END with }
and see what make Wx.o says
Thanks
Mattia
|