Hi,

I have a problem with storing data in a struct. When I compile the 
application I get this error message:

/usr/m68k-palmos/bin/ld: region coderes is full (Debug/EVAC Service 
Assistant section .text)
collect2: ld returned 1 exit status
make: *** [Debug/EVAC Service Assistant] Error 1

The structure is defined like this:

typedef struct
{
    UInt16 ControlID;
    UInt16 ScreenID;
    char *Text;
    char *ProgressText;
    Boolean Visible;
} ControlProperties;

And the code which throw this linking error is this:

void ConfigSetControlProperties(UInt16 screenID,
                                               UInt16 controlID,
                                               char *text,
                                               char *progressText,
                                               Boolean visible)
{
    ControlProperties *prop;

    index = ControlExists(screenID, controlID);

    prop = (ControlProperties*)MemPtrNew(sizeof(ControlProperties));

    if (index == -1)
    {
        //create new property
        index = nextFreeControl;
        nextFreeControl++;
    }

    Controls[index] = prop;

    prop->ControlID = controlID;
    prop->ScreenID = screenID;
    prop->Visible = visible;

    prop->Text = (char*)MemPtrNew(10 * sizeof(char));
    // StrCopy(prop->Text, text);

    UtilsShowDebugMessage(text);
}

When I comment the section where I allocate new mem for the char* var than 
the linker throws no error.

Can anybody tell me what is wrong here and how I can use a structure to 
store specific data in vector of this structure.

Greets
Arne 



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

Reply via email to