[gccsdk] Using Dynamic Areas

Adam lists at snowstone.org.uk
Sat Jul 19 06:37:44 PDT 2008


On 19 Jul, Lee Noar  wrote:

> Adam wrote:
> > Hi,
> > 
> > How do I enable the use of dynamic areas for my app, rather than the
> > default use of the wimpslot (GCC3.4.6)?
> 
> You set a system variable with a name based on that of your binary,
> eg,  for gcc you would use:
> 
> Set gcc$heap ""

OK, thanks. Does <appname$heap> have to be active at compile time, or
just run time? Anyway, I guess that means I have to give my binary a name
somehow...

Looking at the Usage file[1] and the UnixLib header files, I think I need
to do:

  #include <unixlib/features.h>
  const char * const * const ___program_name = "BayTrader";

Unfortunately I'm still flumoxed:
 - How many "_"s should there be? The comments seem to say 2, but the
   actual definition uses 3.
 - My #include line doesn't work. What's the correct way to refer to the
   unixlib headers?
 - I'm completely lost about the series of three "const" declarations
   and the compiler says "initialization from incompatible pointer type".

Sorry - I'm sure I'm making this more complicated than it should be!

Adam

[1] Though I'm not sure if the example is out of date as I couldn't find
local.h

-- 
Adam Richardson          Carpe Diem
http://www.snowstone.org.uk/riscos/




More information about the gcc mailing list