Is it possible that normal C++ classes and decendants (without actually virtual 
functions) can cause the use of globals?

I've had a heck of a time getting any C++ functions worknig without being told i'm 
accessing globals in some obscure way.   What
aspects of classes are implemented as globals?

John Marshall wrote:

> Hari Bhaskaran <[EMAIL PROTECTED]> wrote:
> > Yes you can. In fact, if you were using old prc-tools-0.5 or the
> > infamous 0.6.0 version of gcc, which uses A4 based globals, all you
> > have to do is to allocate some memory and load A4 with it and your
> > app will have "real" globals. You can probably do it Metroweks or prctools
> > 2.0, but I don't know about them.
>
> See, the funny thing is that noone seems to realise that prc-tools 2.0+
> allows the use of A4-based globals too.  So does CW.  They currently do so
> with less convenience for people wanting to use standard library functions
> than these other versions of prc-tools.  That will eventually get better
> with prc-tools 2.0+.
>
> All you have to do is read the manual.  Then you will see that prc-tools
> 2.0+ will access variables via A4 with the -mown-gp option, and that it
> includes facilities to make setting up A4 more convenient.  These latter
> facilities are present in no other version of prc-tools.
>
> You say you want to allocate some memory and load A4 to point to it.  Aside
> from a few library routines that you probably would not be using anyway, it
> is a myth that prc-tools 2.0+ does not support that just as well as the
> other versions of prc-tools you mention.
>
> > Anyway, this is a probably a crazy fix to a small inconvenience.
>
> IMHO yup.
>
>     John  "C++ vtbls notwithstanding..."
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see 
>http://www.palmos.com/dev/tech/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to