×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Aug 2006
    Posts
    497

    question about abld build thumb urel

    hi,guys:
    when i use abld build thumb urel,there comes some error like 'myexample.dll' has initialised data ,anybody know how to solve it? thank you

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,569

    Re: question about abld build thumb urel

    Perhaps if you did not initialize data (variables) in the source code of myexample.dll...?

  3. #3
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    280

    Re: question about abld build thumb urel

    Your DLL has writable static data.
    Refer to the sdk help:

    Quote:
    S60 2nd » Developer Library » Symbian OS Guide » Essential idioms » Static data

    Writeable static data in DLLs
    Symbian OS is designed for ROM-based computing. A DLL which is resident in ROM cannot be written to. Although DLLs may in some cases be RAM loaded, Symbian OS makes the conservative assumption that no DLL can be written to. DLLs on Symbian OS therefore have no data segment. An immediate consequence is that no DLL may contain writeable static data, whether initialised or uninitialised.

    Static data is any data declared outside a function, e.g.

    TBufC<20> fileName;
    void SetFileName()
    {
    ...
    }
    Many existing programs make extensive use of this kind of data. On the Emulator, which runs under Windows on a PC, this will not necessarily cause problems because DLLs use the underlying Windows DLL mechanisms in which writeable data is allowed. However, any such code will not compile for non-Emulator targets. The build will fail with a warning from the petran tool, which runs as the final stage of the build chain for non-Emulator targets. The message generated by the petran tool looks like:

    ERROR: Dll 'MENUITEMS[10008AD0].APP' has uninitialised data.

    You must eliminate all writeable static from your DLL in order to avoid this error.

    Because in some cases it is useful for DLLs to maintain data, Symbian OS does provide a mechanism which allows a DLL to manage a small amount of private storage on a per-thread basis, known as thread local storage — see Threads and Processes Overview. A per-thread mechanism is chosen to avoid potential ambiguities which otherwise arise over which of potentially many users of the DLL should see the data.


    --------------------------------------------------------------------------------

    Porting strategies
    To eliminate writeable static data ...

    Symbian doesn't provide Writable Static Data(WSD) till 8.1b Fp3 devices.

  4. #4
    Regular Contributor
    Join Date
    Aug 2006
    Posts
    497

    Re: question about abld build thumb urel

    Quote Originally Posted by Tina_Tibrewal
    Your DLL has writable static data.
    Refer to the sdk help:

    Quote:
    S60 2nd » Developer Library » Symbian OS Guide » Essential idioms » Static data

    Writeable static data in DLLs
    Symbian OS is designed for ROM-based computing. A DLL which is resident in ROM cannot be written to. Although DLLs may in some cases be RAM loaded, Symbian OS makes the conservative assumption that no DLL can be written to. DLLs on Symbian OS therefore have no data segment. An immediate consequence is that no DLL may contain writeable static data, whether initialised or uninitialised.

    Static data is any data declared outside a function, e.g.

    TBufC<20> fileName;
    void SetFileName()
    {
    ...
    }
    Many existing programs make extensive use of this kind of data. On the Emulator, which runs under Windows on a PC, this will not necessarily cause problems because DLLs use the underlying Windows DLL mechanisms in which writeable data is allowed. However, any such code will not compile for non-Emulator targets. The build will fail with a warning from the petran tool, which runs as the final stage of the build chain for non-Emulator targets. The message generated by the petran tool looks like:

    ERROR: Dll 'MENUITEMS[10008AD0].APP' has uninitialised data.

    You must eliminate all writeable static from your DLL in order to avoid this error.

    Because in some cases it is useful for DLLs to maintain data, Symbian OS does provide a mechanism which allows a DLL to manage a small amount of private storage on a per-thread basis, known as thread local storage — see Threads and Processes Overview. A per-thread mechanism is chosen to avoid potential ambiguities which otherwise arise over which of potentially many users of the DLL should see the data.


    --------------------------------------------------------------------------------

    Porting strategies
    To eliminate writeable static data ...

    Symbian doesn't provide Writable Static Data(WSD) till 8.1b Fp3 devices.
    thank you guys, i have solved this question by eliminating the static data and
    global data. thank you.

Similar Threads

  1. questions about abld build thumb urel
    By raylin in forum Symbian
    Replies: 5
    Last Post: 2006-11-30, 10:29
  2. abld build thumb urel ERROR
    By 83.manish in forum Symbian
    Replies: 4
    Last Post: 2006-11-30, 06:42
  3. error with abld build thumb urel
    By cfonnard in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2002-10-08, 17:16

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×