[Gambas-devel] No symlookup warnings for virtual class (r4572)

tobi tobias at ...692...
Fri Apr 13 17:27:31 CEST 2012


> > > Regarding the above problem?
> > > It all vanished after I realised that I haven't had extern'd the class description. As I said, it
> > > was a virtual class accessed via GB_PROPERTY_SELF() and running the corresponding test program
> > > resulted in a 'Unknown symbol ... in class ...".
> > > I'll try to reproduce the code.
> > >
> > > Regards,
> > > Tobi
> > >
> > 
> > Anyway can you commit your component so that I look at it? :-)
> > 
> > -- 
> > Benoît Minisini
> > 
> > ------------------------------------------------------------------------------
> > For Developers, A Lot Can Happen In A Second.
> > Boundary is the first to Know...and Tell You.
> > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> > http://p.sf.net/sfu/Boundary-d2dvs2
> > _______________________________________________
> > Gambas-devel mailing list
> > Gambas-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-devel
> > 
> 
> It's on the road, but can take a minute, I haven't commited to svn yet ;)
> 
> 
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel
> 

Here you are (r4621). If you look into the main.c you will see the .Char.Attrs virtual class
commented out in the EXPORTed GB_CLASSES[]. If you would run a program like that:

--8<-------------------------
' Gambas Module file

Public Sub Main()
  Dim hW As New Window(0, 0, 10, 10)

  hW.Attributes[0, 0].Reverse = True
End
--8<-------------------------

(written from scratch)
you will encounter the "#11: Unknown symbol 'Reverse' in class '.Char.Attrs'" error. Getting this
error, is, of course, a matter of piping stdout from the program to something like hexdump(1). It
looks ugly but you can find the message between the terminal control data.
As the class description is not exported, it shouldn't exist at all, but there is no compilation
warning. I suppose, as previously stated, that this is due to that it is a virtual class, but don't
know about the internals...

Tobi





More information about the Devel mailing list